#5 Using with_scope

#models/task.rb
def self.find_incomplete(options = {})
  with_scope :find => options do
    find_all_by_complete(false, :order => 'created_at DESC')
  end
end

你可能感兴趣的:(Ruby,Rails)