Sha256: 24df9b7fd9d5af4ed34305d5220d17952656da99639ddffcd71dbb95c415b477

Contents?: true

Size: 752 Bytes

Versions: 10

Compression:

Stored size: 752 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

10 entries across 10 versions & 2 rubygems

Version Path
enju_trunk_subject-1.0.4 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre12 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre11 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre10 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre9 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre8 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre7 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre6 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre5 app/models/subject_heading_type_has_subject.rb
enju_subject-0.1.0.pre4 app/models/subject_heading_type_has_subject.rb