I am using Active admin gem in my rails app. I added resources book which has 20 columns, now i need to customize only one column and print the remaining as it is. I tried below code
ActiveAdmin.register Book do
index do
column :description do
raw "<a class='view_description button'>View Description</a>"
end
end
end
but which hides all the columns and show only description. Any help will be useful.
How about this?
ActiveAdmin.register Book do
index do
columns_to_exclude = ["name"]
(Book.column_names - columns_to_exclude).each do |c|
column c.to_sym
end
column :description do
raw "<a class='view_description button'>View Description</a>"
end
end
end