Sha256: 9bf67bf780d9ead6310a8e4b78680a17686b76fadf66cdc3410867c02d535fc6
Contents?: true
Size: 501 Bytes
Versions: 98
Compression:
Stored size: 501 Bytes
Contents
class Project < ActiveRecord::Base has_and_belongs_to_many :developers, :uniq => true has_many :topics # :finder_sql => 'SELECT * FROM topics WHERE (topics.project_id = #{id})', # :counter_sql => 'SELECT COUNT(*) FROM topics WHERE (topics.project_id = #{id})' has_many :replies, :through => :topics do def find_recent(params = {}) with_scope :find => { :conditions => ['replies.created_at > ?', 15.minutes.ago] } do find :all, params end end end end
Version data entries
98 entries across 98 versions & 33 rubygems