Created
December 31, 2015 08:10
-
-
Save ihatov08/4f2aca2af9c1e544b6ef to your computer and use it in GitHub Desktop.
seedデータの投入方法 ref: http://qiita.com/ihatov08/items/e1fdc66537120a095840
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
$ rake db:seed | |
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
100.times do |index| | |
Post.create(title: "タイトル#{index}", body: "ブログの内容#{index}", category: "カテゴリー#{index}") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment