Initial commit of foodsoft 2
This commit is contained in:
commit
5b9a7e05df
657 changed files with 70444 additions and 0 deletions
15
vendor/plugins/will_paginate/test/fixtures/project.rb
vendored
Normal file
15
vendor/plugins/will_paginate/test/fixtures/project.rb
vendored
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue