diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-19 17:21:16 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-20 10:41:05 +0200 |
commit | d475de7e2573847bf4b13c291618053f30070a21 (patch) | |
tree | 7dbb9fc50009b1b9f30c97c486b238f03f270c55 /activerecord/lib/active_record | |
parent | 0523b55ab9f823b0cb3643714e890b2c2077820e (diff) | |
download | rails-d475de7e2573847bf4b13c291618053f30070a21.tar.gz rails-d475de7e2573847bf4b13c291618053f30070a21.tar.bz2 rails-d475de7e2573847bf4b13c291618053f30070a21.zip |
Add helper for loading seed data for engine and application
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 3c5981a120..ccaa1f01f6 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -299,8 +299,7 @@ namespace :db do desc 'Load the seed data from db/seeds.rb' task :seed => 'db:abort_if_pending_migrations' do - seed_file = File.join(Rails.root, 'db', 'seeds.rb') - load(seed_file) if File.exist?(seed_file) + Rails.application.load_seed end namespace :fixtures do |