0

I am using Rails Admin. I have three models:

class Tag < ActiveRecord::Base
    has_many :tags_users, :dependent => :destroy  
end

class TagsUser < ActiveRecord::Base
    belongs_to :user_spot, :inverse_of => :tags_users
    belongs_to :tag
end

class UserSpot < ActiveRecord::Base
    has_many :tags_users, :inverse_of => :user_spot
    accepts_nested_attributes_for :tags_users, :allow_destroy => true
end

and what's being displayed:

Image

I would like to hide the buttons "Add a new tag" and "Edit this tag". How could I do that?

1 Answer 1

2

Try

field :tag do 
  inline_add false
  inline_edit false
end
Sign up to request clarification or add additional context in comments.

1 Comment

I added it in config.model TagsUser in initializers/rails_admin.rb and it worked. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.