[英]rails_admin plugin issue with nested form on a has_many :through relationship
[英]rails_admin issue: has_many :through form doesn't work
我正在使用rails_admin
gem並具有此Post
模型
class Post < ActiveRecord::Base
# Association
has_many :post_categories
has_many :categories, through: :post_categories
has_many :post_tags
has_many :tags, through: :post_tags
# rails_admin configuration
rails_admin do
edit do
field :title
field :categories
field :tags
end
end
end
問題是類別字段按預期顯示,但標記字段卻未顯示。
請告訴我什么可能錯了?
我想您會丟失accepts_nested_attributes_for :tags
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.