Fix seeds superadmin password changement
This commit is contained in:
parent
0bb9f5115e
commit
c4420cd6bc
1 changed files with 7 additions and 1 deletions
|
@ -1 +1,7 @@
|
|||
Administration.create(email: SUPERADMIN.email, password: SUPERADMIN.password)
|
||||
begin
|
||||
Administration.create!(email: SUPERADMIN.email, password: SUPERADMIN.password)
|
||||
rescue ActiveRecord::RecordInvalid
|
||||
admin = Administration.find_by_email(SUPERADMIN.email)
|
||||
admin.password = SUPERADMIN.password
|
||||
admin.save
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue