Any thoughts on how to conditionally display columns with the ActiveAdmin DSL?
index do
selectable_column
id_column
column :name
column :address, if: current_user.admin?
column :phone
column :role
column :created_at
column :updated_at
actions
end
You can do something like this:
index do
selectable_column
id_column
column :name
if current_user.admin?
column :address
end
column :phone
column :role
column :created_at
column :updated_at
actions
end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With