Sha256: 7f883f23f788e219b5e6c8a30aafe31e57f825bf00358af82475360af4f790aa
Contents?: true
Size: 785 Bytes
Versions: 14
Compression:
Stored size: 785 Bytes
Contents
module Abstractor module Methods module Models module AbstractorSubjectGroup def self.included(base) base.send :include, SoftDelete # Associations base.send :has_many, :abstractor_subject_group_members base.send :has_many, :abstractor_subjects, :through => :abstractor_subject_group_members base.send :has_many, :abstractor_abstraction_groups base.send :has_many, :abstractor_abstractions, :through => :abstractor_abstraction_groups # base.send :attr_accessible, :deleted_at, :name # Validations base.send :validates, :cardinality, numericality: { only_integer: true, greater_than: 0 }, unless: Proc.new { |a| a.cardinality.blank? } end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems