Sha256: 5467e908bf9bd316107ecee5e369815d0b78f93b9e3e27faf3e9798a522ca501

Contents?: true

Size: 497 Bytes

Versions: 14

Compression:

Stored size: 497 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

14 entries across 14 versions & 1 rubygems

Version Path
refinerycms-0.9.6.34 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.33 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.32 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.31 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.30 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.29 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.28 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.27 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.26 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.25 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.24 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.23 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.22 vendor/plugins/will_paginate/test/fixtures/project.rb
refinerycms-0.9.6.21 vendor/plugins/will_paginate/test/fixtures/project.rb