Skip to content

Instantly share code, notes, and snippets.

@kobeumut
Created January 11, 2018 05:37
Show Gist options
  • Save kobeumut/3fb38edef9b5144d4a7639ab7679a398 to your computer and use it in GitHub Desktop.
Save kobeumut/3fb38edef9b5144d4a7639ab7679a398 to your computer and use it in GitHub Desktop.
Exclude some columns on ActiveAdmin
ActiveAdmin.register App do
ActionController::Parameters.permit_all_parameters = true
menu priority: 6, label: "Uygulamalar"
index do
selectable_column
excluded = ["app_image","updated_at","domain_id"]
(App.column_names - excluded).each do |c|
column c.to_sym
end
column :domain, sortable: true do | item |
item.domain # this could be any attribute attached to the order_item table
end
actions
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment