Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActiveAdmin Rails edit/delete

Using ActiveAdmin for a rails application (very impressed so far).

My question is, when I let it do it's default thing, it displays all the fields plus 3 other links that allow me to 'edit' / 'delete' that item. However if I modify the ActiveAdmin.register [resource] bit, the 'edit'/'delete' lines disappear in the output.

ActiveAdmin.register Highscore do
    index do
        column :id
        column :user
        column :score
        column :level
        column :created_at
        column :updated_at
    end
end

How do I link to the edit/delete stuff?

like image 314
1dayitwillmake Avatar asked Jan 18 '23 22:01

1dayitwillmake


1 Answers

Try some code like this:

ActiveAdmin.register Highscore do
    index do
        column :id
        column :user
        column :score
        column :level
        column :created_at
        column :updated_at
        default_actions
    end
end

You can also add custom actions by following this wiki page.

like image 57
Devin M Avatar answered Jan 29 '23 06:01

Devin M