Created
March 19, 2013 03:15
-
-
Save morimorihoge/5193445 to your computer and use it in GitHub Desktop.
rails console等で適当にデータを突っ込む使い捨てコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = [] | |
data << {:field_1 => 'abcde', :field_2 => 10, :field_3 => '2727291'} | |
data << {:field_1 => 'fghij', :field_2 => 200, :field_3 => '12177'} | |
# more data | |
data.each do |d| | |
SomeModel.new d | |
d.save! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment