Skip to content

Commit

Permalink
Merge pull request openfarmcc#288 from rickcarlino/master
Browse files Browse the repository at this point in the history
Update seeds file
  • Loading branch information
RickCarlino committed Nov 4, 2014
2 parents 9a92a79 + a8a7ddd commit 53bbf8b
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
require 'factory_girl_rails'
if Rails.env != 'production' # <= Prevent catastrophe
Mongoid.purge!
FactoryGirl.create(:user, admin: true,
email: '[email protected]',
password: 'admin123',
password_confirmation: 'admin123')
FactoryGirl.create_list(:crop, 40)
admin = FactoryGirl.create(:user, admin: true,
email: '[email protected]',
password: 'admin123',
password_confirmation: 'admin123')
FactoryGirl.create_list(:stage, 10)
FactoryGirl.create_list(:stage_option, 10)
FactoryGirl.create_list(:requirement_option, 10)
FactoryGirl.create_list(:requirement, 10)
FactoryGirl.create_list(:requirement_option, 10)
Guide.all.each{ |gde| gde.update_attributes(user: admin) }
end

0 comments on commit 53bbf8b

Please sign in to comment.