Sha256: 4994bddc87504ea558de75c0b793058e6b95414f9be0b2ee2524dfcc607ad3d3

Contents?: true

Size: 749 Bytes

Versions: 3

Compression:

Stored size: 749 Bytes

Contents

class SubjectHeadingTypeHasSubject < ActiveRecord::Base
  attr_accessible :subject_id, :subject_heading_type_id
  belongs_to :subject #, :polymorphic => true
  belongs_to :subject_heading_type

  validates_presence_of :subject, :subject_heading_type
  validates_associated :subject, :subject_heading_type
  validates_uniqueness_of :subject_id, :scope => :subject_heading_type_id
end

# == Schema Information
#
# Table name: subject_heading_type_has_subjects
#
#  id                      :integer         not null, primary key
#  subject_id              :integer         not null
#  subject_type            :string(255)
#  subject_heading_type_id :integer         not null
#  created_at              :datetime
#  updated_at              :datetime
#

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_subject-0.1.0.pre3 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre2 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre app/models/subject_heading_type_has_subject.rb