5
我有這些協會的形式:ActiveAdmin定製的belongs_to的
class Course < ActiveRecord::Base
has_many :signup
has_many :user, :through => :signup
accepts_nested_attributes_for :signup
end
class User < ActiveRecord::Base
has_many :signup
has_many :course, :through => :signup
accepts_nested_attributes_for :signup
end
class Signup < ActiveRecord::Base
belongs_to :course
belongs_to :user
end
現在,我想自定義爲「註冊」的ActiveAdmin形式,所以它顯示了課程的標題和用戶名作爲選擇而不是文本框。
默認窗體已經這樣做了,但是我需要進一步自定義窗體,我無法重現默認窗體。