以下是我的模型:
class Poll < ActiveRecord::Base
attr_accessible :published, :title
validates :published, :presence => true
validates :title, :presence => true,
:length => { :minimum => 10 }
has_many :choice, :dependent => :destroy
end
class Choice < ActiveRecord::Base
belongs_to :poll
attr_accessible :choice_text, :votes
validates :choice_text, :presence => true
end
然后我尝试安装rails admin。我能够在管理员中创建选择和民意调查,但我无法将选择与民意调查相关联,反之亦然。
我该怎么做?