I have Rails with ActiveAdmin with Devise for Authentication. I have AdminUser and User models, so the user model does not have to worry about administration. However, I cannot create / edit either Adminuser or User FROM INSIDE on the admin page. Every time I try to do this, he will give me a message
Can't mass-assign protected attributes: email, password, password_confirmation
This is strange because inside the User and AdminUser models I already have:
attr_accessible :email, :password, :password_confirmation
To try it another way, I went to the rails console and tried to create AdminUser, and it all worked:
AdminUser.create(:email => ' asdf@admin2.com ', :password => 'password', :password_confirmation => 'password')
This means that it was not possible to create only creation from the admin web page.
I am using Devise for Authentication. The error occurs with the User and AdminUser models.
For password and configuration_password, I do not have these fields in the database, but by default it is Devise by default, it never has a password in the database.
Here is the user model:
devise :database_authenticatable, :registerable, :rememberable, :recoverable, :trackable, :omniauthable, :omniauth_providers => [:facebook]