Creating a new admin user in activeadmin
I'm using active admin on rails 4, I white-listed the parameters for admin users in the controller using: ActiveAdmin.register AdminUser do controller do def permitted_params params.permit(:admin_user => [:email, :password, :password_confirmation]) end end end but when I try to add a new user, I get the error "cannot be blank" on the email and password fields. The logs read the following: Unpermitted parameters: utf8, authenticity_token, commit Unpermitted parameters: utf8, authenticity_token, admin_user, commit Is there something I'm missing?
I was also facing the same issue. Changing params.permit(:admin_user => [:email, :password, :password_confirmation]) to params.permit(:user => [:email, :password, :password_confirmation]) solved the issue. devise in active admin creates model with name user and in active admin user model, its mentioned as admin_user.
In my case it was happenning because i had a validation for an associated record on that model. Disabling that validation fixes it, will need to check how to disable validations for active admin only.
ActiveAdmin limiting has_many association retrieval?
In Active Admin, all of my models form views seem to refer just one of those models
Rails ActiveAdmin : How to place filters on the top in index action
change css styles of active admin
Active admin install with Rails 4
ActiveAdmin won't save has many and belongs to many field
Truncate data in ActiveAdmin index page
Active Admin: how to set filter label dynamically
How to add an HTML-class to an ActiveAdmin index table
How to use modules to split very long code in active admin?
Downloading all records of a paginated resource in ActiveAdmin
Can you use the Form() command in ActiveAdmin in the content of a custom page?
CollectionAction route being skipped, action treated as ID
Possible to “split” an ActiveAdmin resource between multiple menu items?
Rails: activeadmin, undefined method `per' for #<ActiveRecord::Relation:0x4d15ee0>
Active Admin create form in register_page