Commit 4cbc2436fdd290ff5270156e287c98605a9625c8
1 parent
b365d9b4
Exists in
master
and in
1 other branch
Fixed seed that tried to set protected attribute
Showing
1 changed file
with
7 additions
and
4 deletions
Show diff stats
db/seeds.rb
| ... | ... | @@ -10,10 +10,13 @@ puts "-- email: #{admin_email}" |
| 10 | 10 | puts "-- password: #{admin_pass}" |
| 11 | 11 | puts "" |
| 12 | 12 | puts "Be sure to change these credentials ASAP!" |
| 13 | -User.create!({ | |
| 13 | +u = User.create!({ | |
| 14 | 14 | :name => 'Errbit Admin', |
| 15 | 15 | :email => admin_email, |
| 16 | 16 | :password => admin_pass, |
| 17 | - :password_confirmation => admin_pass, | |
| 18 | - :admin => true | |
| 19 | -}) | |
| 20 | 17 | \ No newline at end of file |
| 18 | + :password_confirmation => admin_pass | |
| 19 | +}) | |
| 20 | + | |
| 21 | +#Admin is protected | |
| 22 | +u.admin=true | |
| 23 | +u.save | |
| 21 | 24 | \ No newline at end of file | ... | ... |