Custom route for activeadmin actions?

前端 未结 3 863
情歌与酒
情歌与酒 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:52

    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
    

提交回复
热议问题