Sha256: 65e85272201761add7e0f85fac73f495997da936ef3385088c3e3b9318004705
Contents?: true
Size: 399 Bytes
Versions: 5
Compression:
Stored size: 399 Bytes
Contents
class Developer < User has_and_belongs_to_many :projects, :join_table => 'developers_projects' def self.with_poor_ones(&block) options = { :conditions => ['salary <= ?', 80000], :order => 'salary' } with_scope({ :find => options }, :overwrite) do yield end end scope :poor, lambda { where(['salary <= ?', 80000]).order('salary') } def self.per_page() 10 end end
Version data entries
5 entries across 5 versions & 1 rubygems