Remove 'Show' link from ActiveAdmin default_actions

前端 未结 2 1276
迷失自我
迷失自我 2021-02-01 22:24

I\'ve made a title of my resources as a link to a Show action. Now I want to remove that link form default_actions.

actions :all, :except =         


        
2条回答
  •  渐次进展
    2021-02-01 22:49

    I did it this way (resource_path).

    column "" do |resource|
      links = ''.html_safe
      links += link_to I18n.t('active_admin.edit'), edit_resource_path(resource), :class => "member_link edit_link"
      links += link_to I18n.t('active_admin.delete'), resource_path(resource), :method => :delete, :confirm => I18n.t('active_admin.delete_confirmation'), :class => "member_link delete_link"
      links
    end
    

提交回复
热议问题