ActiveAdmin에 문제가 있습니다. ActiveAdmin 양식 문제 (has_many)
나는이 다음 모델 :template.rb
class Template < ActiveRecord::Base
belongs_to :category
has_many :template_questions
has_many :questionnaires
attr_accessible :category, :string
accepts_nested_attributes_for :template_questions
end
template_question.rb
class TemplateQuestion < ActiveRecord::Base
belongs_to :template
attr_accessible :number, :question
end
그리고이 활성 관리자 자원 내가 해요
ActiveAdmin.register Template do
form do |f|
f.inputs "Details" do
f.input :title
f.input :category
end
f.inputs "Questions" do
f.has_many :template_questions do |j|
j.input :question
end
end
f.buttons
end
end
...에 ActiveAdmin 인터페이스의 양식 제목과 카테고리에 대한 필드가 올바르게 표시됩니다. 그런 다음 질문 섹션에 질문을 추가하는 버튼이 있지만 클릭 할 때 아무 것도하지 않습니다.
내가 잘못하고있는 것에 대한 아이디어가 있습니까? 감사!
이것은 내 주요 문제가 아니며, 자바 스크립트로 밝혀졌습니다. 하지만 덕분에이 일이 정말 나중에 도움이되었습니다. –
동일한 문제가 있습니다. "javascript가있는 것"이 무엇인지 알려주실 수 있습니까? – jeem