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形式,所以它显示了课程的标题和用户名作为选择而不是文本框。
默认窗体已经这样做了,但是我需要进一步自定义窗体,我无法重现默认窗体。