Sha256: 73fc50d6e03db9d093e778e7cadc676ec28a19142212f55bf9acd0326f13c08c
Contents?: true
Size: 297 Bytes
Versions: 6
Compression:
Stored size: 297 Bytes
Contents
class User < ActiveRecord::Base has_many :readings has_many :articles, :through => :readings has_many :comments, :as => :person has_one :first_comment, :as => :person, :class_name => "Comment" def find_custom_articles articles.where("name = ?", "Article One") end end
Version data entries
6 entries across 6 versions & 1 rubygems