Sha256: 916afc895c3194a7ddcf3f0536b92bbac46cff8982331a5e1eed9a250a639a8c

Contents?: true

Size: 398 Bytes

Versions: 6

Compression:

Stored size: 398 Bytes

Contents

class Person < ActiveRecord::Base
  has_many :readers
  has_many :posts, :through => :readers
  has_many :posts_with_no_comments, :through => :readers, :source => :post, :include => :comments, :conditions => 'comments.id is null'

  has_many :references
  has_many :jobs, :through => :references
  has_one :favourite_reference, :class_name => 'Reference', :conditions => ['favourite=?', true]

end

Version data entries

6 entries across 6 versions & 4 rubygems

Version Path
ferblape-query_memcached-2.2.2 test/testing_app/app/models/person.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/activerecord/test/models/person.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/activerecord/test/models/person.rb
activerecord-2.1.0 test/models/person.rb
antfarm-0.3.0 rails/vendor/rails/activerecord/test/models/person.rb
antfarm-0.4.0 rails/vendor/rails/activerecord/test/models/person.rb