ActiveAdmin - appending more than one custom link to `actions` in index doesn't work

2.8k Views Asked by At

I'm trying to append custom links in my index view in ActiveAdmin following these examples: http://activeadmin.info/docs/3-index-pages/index-as-table.html. My code is:

  index do
    actions do |foo|
      link_to 'Link1', '#', class: 'member_link'
      link_to 'Link2', '#', class: 'member_link'
    end
  end

Only the last link is appended. How do I append two links?

2

There are 2 best solutions below

0
On

Something like this works:

column "Actions" do |affiliate|    
  link_to('Approve', '/approve') + " | " + link_to('Deny', '/deny')
end
0
On

ActiveAdmin has a fix for that issue. Take a look on this PR https://github.com/activeadmin/activeadmin/pull/3463