Skip to content

Instantly share code, notes, and snippets.

@tigawa
Last active December 11, 2015 19:59
Show Gist options
  • Save tigawa/4652623 to your computer and use it in GitHub Desktop.
Save tigawa/4652623 to your computer and use it in GitHub Desktop.
ruby rails サンプルデータの登録
#seeds.rb
Product.delete_all
Product.create(title: 'Programming Ruby 1.9',
description:
%{<p>
Ruby is the fastest growing and
</p>
},
imge_url: 'ruby.jpg',
price: 49.95)
@tigawa
Copy link
Author

tigawa commented Jan 28, 2013

実行

rake db:seed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment