Sha256: 1ae3a5f00b723e989f4544af0ec820316db407b1b5e4607b45117c1c9171a127
Contents?: true
Size: 687 Bytes
Versions: 10
Compression:
Stored size: 687 Bytes
Contents
module Spina class StructurePart < ApplicationRecord include Part include ImageCollectable include Optionable belongs_to :structure_item, optional: true belongs_to :structure_partable, polymorphic: true, optional: true accepts_nested_attributes_for :structure_partable, allow_destroy: true validates :structure_partable_type, presence: true validates :name, uniqueness: {scope: :structure_item_id} alias_attribute :partable, :structure_partable alias_attribute :partable_id, :structure_partable_id alias_attribute :partable_type, :structure_partable_type alias_method :structure_partable_attributes=, :partable_attributes= end end
Version data entries
10 entries across 10 versions & 1 rubygems