Custom route for activeadmin actions?

前端 未结 3 841
情歌与酒
情歌与酒 2021-01-13 11:22

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

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-13 11:45

    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
    

提交回复
热议问题