Sha256: 04019a720afd83f90449c523fa5890d6358021f8f51d548a83027104bc8de86c
Contents?: true
Size: 610 Bytes
Versions: 2
Compression:
Stored size: 610 Bytes
Contents
module Headmin module Field extend ActiveSupport::Concern included do # Configuration has_closure_tree order: "position", numeric_order: true # Associations belongs_to :fieldable, polymorphic: true, optional: true, touch: true belongs_to :field, optional: true, touch: true has_many :fields, foreign_key: "parent_id" accepts_nested_attributes_for :fields, allow_destroy: true # field_type: :files, :file has_many_attached :files, dependent: :detach accepts_nested_attributes_for :files_attachments, allow_destroy: true end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
headmin-0.5.5 | app/models/concerns/headmin/field.rb |
headmin-0.5.4 | app/models/concerns/headmin/field.rb |