Sha256: 37e5d215a17208d7e43e057da34febb072ee6b1e979d92c687bb67d71eca375f

Contents?: true

Size: 289 Bytes

Versions: 37

Compression:

Stored size: 289 Bytes

Contents

class User < ActiveRecord::Base
  has_many :readings
  has_many :articles, :through => :readings
  has_many :comments, :as => :person
  has_many :hacks, :through => :comments, :source => :hack
  
  def find_custom_articles
    articles.where("name = ?", "Article One")
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
composite_primary_keys-12.0.2 test/fixtures/user.rb
composite_primary_keys-11.3.1 test/fixtures/user.rb
composite_primary_keys-12.0.1 test/fixtures/user.rb
composite_primary_keys-12.0.0 test/fixtures/user.rb
composite_primary_keys-12.0.0.rc5 test/fixtures/user.rb
composite_primary_keys-12.0.0.rc4 test/fixtures/user.rb
composite_primary_keys-12.0.0.rc3 test/fixtures/user.rb
composite_primary_keys-12.0.0.rc2 test/fixtures/user.rb
composite_primary_keys-12.0.0.rc1 test/fixtures/user.rb
composite_primary_keys-11.2.0 test/fixtures/user.rb
composite_primary_keys-11.1.0 test/fixtures/user.rb
composite_primary_keys-11.0.3 test/fixtures/user.rb
composite_primary_keys-11.0.2 test/fixtures/user.rb
composite_primary_keys-10.0.5 test/fixtures/user.rb
composite_primary_keys-9.0.10 test/fixtures/user.rb
composite_primary_keys-11.0.1 test/fixtures/user.rb
composite_primary_keys-11.0.0 test/fixtures/user.rb
composite_primary_keys-10.0.4 test/fixtures/user.rb
composite_primary_keys-9.0.9 test/fixtures/user.rb
composite_primary_keys-10.0.3 test/fixtures/user.rb