【发布时间】:2016-02-12 18:26:25
【问题描述】:
我正在使用 Rails 管理员。我有三个模型:
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
以及正在显示的内容:
我想隐藏“添加新标签”和“编辑此标签”按钮。我怎么能这样做?
【问题讨论】:
标签: ruby-on-rails ruby has-many rails-admin belongs-to