Sha256: d2e725cb0f08aea35cf6ba4128f752731bc9170e282c8cad9d8aaba34f5bc42a

Contents?: true

Size: 492 Bytes

Versions: 9

Compression:

Stored size: 492 Bytes

Contents

class Article < ActiveRecord::Base
  validates :id, uniqueness: true, numericality: true, allow_nil: true, allow_blank: true, on: :create
  has_many :readings, :dependent => :delete_all
  has_many :users, :through => :readings

  has_many :comments, :dependent => :delete_all
  has_many :employee_commentators, :through => :comments, :source => :person, :source_type => :employee
  has_many :user_commentators, :through => :comments, :source => :person, :source_type => "User"
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
composite_primary_keys-13.0.1 test/fixtures/article.rb
composite_primary_keys-13.0.0 test/fixtures/article.rb
composite_primary_keys-12.0.10 test/fixtures/article.rb
composite_primary_keys-12.0.9 test/fixtures/article.rb
composite_primary_keys-12.0.8 test/fixtures/article.rb
composite_primary_keys-12.0.6 test/fixtures/article.rb
composite_primary_keys-12.0.5 test/fixtures/article.rb
composite_primary_keys-12.0.4 test/fixtures/article.rb
composite_primary_keys-12.0.3 test/fixtures/article.rb