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?
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.
精彩评论