I\'m making a page with activeadmin to update password of current user. I have a non-persisted model to check validation of password, etc. My problem is that when I try
It seems to me that the controller name UpdatePassword is confusing.
The paths end up being something like:
edit_admin_update_passwords_path
update_admin_update_passwords_path
I think that this would be better:
ActiveAdmin.register Password do
actions :edit, :update
end
or
ActiveAdmin.register User do
actions :edit, :update
end
Though the question is about 2 years old, but you can achieve routing as well as the customized method using collection_action
or member_action
. Refer this.
I couldn't find a way to do it with activeadmin but defining the routes manually worked:
#config/routes.rb
match "/admin/update_passwords" => 'admin/update_passwords#edit', via: :get, as: "admin_update_passwords"
match "/admin/update_passwords" => 'admin/update_passwords#update', via: :post