Application_Form/app/models/application_form_item.rb

12 lines
332 B
Ruby

class ApplicationFormItem
include Mongoid::Document
include Mongoid::Timestamps
field :title, localize: true
belongs_to :application_form_main
has_many :application_form_item_contents, :autosave => true, :dependent => :destroy
accepts_nested_attributes_for :application_form_item_contents, :allow_destroy => true
end