Sha256: afa4cd35f27eda4a45fe10ba8cae62701c8d6b279a5912e5e74e75acd013bc38
Contents?: true
Size: 357 Bytes
Versions: 6
Compression:
Stored size: 357 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 has_many :persons, :through => :comments, :source_type => 'User' def find_custom_articles articles.where("name = ?", "Article One") end end
Version data entries
6 entries across 6 versions & 1 rubygems