Sha256: 9fa269ca9188221932b88d602d57c1fbea441fa9b7a06fd5089e30ce975b2f9b
Contents?: true
Size: 545 Bytes
Versions: 1
Compression:
Stored size: 545 Bytes
Contents
module Spina class StructurePart < ApplicationRecord include Part belongs_to :structure_item belongs_to :structure_partable, polymorphic: 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_type, :structure_partable_type alias_method :structure_partable_attributes=, :partable_attributes= end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
spina-0.10.0 | app/models/spina/structure_part.rb |