Sha256: caf1b3974f0e05b9691231fc7bbefbcf8c2c18d1519bb4326a303459ea0a7450

Contents?: true

Size: 426 Bytes

Versions: 3

Compression:

Stored size: 426 Bytes

Contents

class Developer < User
  has_and_belongs_to_many :projects, :order => 'projects.name', :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

3 entries across 3 versions & 2 rubygems

Version Path
will_paginate_seo-3.0.4 spec/fixtures/developer.rb
will_paginate-3.0.7 spec/fixtures/developer.rb
will_paginate-3.0.6 spec/fixtures/developer.rb