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

Version Path
auxesis-will_paginate-3.0.0 spec/fixtures/project.rb
decisiv-will_paginate-2.3.6.1 test/fixtures/project.rb
decisiv-will_paginate-2.3.6 test/fixtures/project.rb
decisiv-will_paginate-2.3.8.1 test/fixtures/project.rb
dweinand-will_paginate-2.3.4 test/fixtures/project.rb
dweinand-will_paginate-2.3.7 test/fixtures/project.rb
fermion-will_paginate-2.3.8 test/fixtures/project.rb
gcirne-will_paginate-2.3.8 test/fixtures/project.rb
gigpark-will_paginate-2.3.11 test/fixtures/project.rb
gohanlon-will_paginate-2.3.3 test/fixtures/project.rb
jcnetdev-will_paginate-2.3.21 test/fixtures/project.rb
kamal-will_paginate-2.3.8 test/fixtures/project.rb
mislav-will_paginate-2.2.3 test/fixtures/project.rb
mislav-will_paginate-2.3.0 test/fixtures/project.rb
mislav-will_paginate-2.3.1 test/fixtures/project.rb
mislav-will_paginate-2.3.10 test/fixtures/project.rb
mislav-will_paginate-2.3.2 test/fixtures/project.rb
mislav-will_paginate-2.3.3 test/fixtures/project.rb
mislav-will_paginate-2.3.4 test/fixtures/project.rb
mislav-will_paginate-2.3.5 test/fixtures/project.rb