mr_muscle
mr_muscle

Reputation: 2900

Rails ActiveAdmin display only view action

I've got standard ActiveAdmin table view for index. The thing is I want to show only View if it comes to action. Like below:

ActiveAdmin.register Conversation do
(...)

  index do
    column 'User email', :sendable
    column :tag
    column 'Category', :topic
    column 'Last update', :updated_at
    actions only: :show
  end
end

actions only: :show is not working. Is there any way to do this without using action_item ?

Upvotes: 0

Views: 1225

Answers (1)

Sjors Branderhorst
Sjors Branderhorst

Reputation: 2182

I think this should work:

actions :all, except: [:edit, :update, :destroy]

Let me know if it doesn't.

Upvotes: 2

Related Questions