Sha256: f32951fc1966fda34278dfd7a47c72525ca210f3bf3e6dfc82d9d751bd80f942
Contents?: true
Size: 674 Bytes
Versions: 16
Compression:
Stored size: 674 Bytes
Contents
module Gaku class Program < ActiveRecord::Base has_many :program_specialties has_many :specialties, through: :program_specialties has_many :program_levels has_many :levels, through: :program_levels has_many :program_syllabuses has_many :syllabuses, through: :program_syllabuses belongs_to :school validates :name, :school, presence: true validates :name, uniqueness: true accepts_nested_attributes_for :program_levels, :program_specialties, :program_syllabuses, allow_destroy: true def to_s name end end end
Version data entries
16 entries across 16 versions & 2 rubygems