tracks/vendor/gems/will_paginate-2.3.15/test/fixtures/developer.rb
Reinier Balt e84e899bef fix #1097 by unpacking gems into vendor
except RedCloth which needs native extentions
2011-02-25 15:31:05 +01:00

14 lines
428 B
Ruby

class Developer < User
has_and_belongs_to_many :projects, :include => :topics, :order => 'projects.name'
def self.with_poor_ones(&block)
with_scope :find => { :conditions => ['salary <= ?', 80000], :order => 'salary' } do
yield
end
end
named_scope :distinct, :select => 'DISTINCT `users`.*'
named_scope :poor, :conditions => ['salary <= ?', 80000], :order => 'salary'
def self.per_page() 10 end
end