Skip to content

Commit

Permalink
seed an admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
gdagley committed Oct 13, 2012
1 parent 85e1905 commit 98527e6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@
#
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
# Mayor.create(name: 'Emanuel', city: cities.first)
admin = User.first
unless admin
admin = User.create(:email => 'admin@email.com', :password => 'monkey', :password_confirmation => 'monkey')
end
admin.roles << :admin
admin.save

0 comments on commit 98527e6

Please sign in to comment.