Skip to content

Instantly share code, notes, and snippets.

@semikolon
Created January 9, 2009 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semikolon/45128 to your computer and use it in GitHub Desktop.
Save semikolon/45128 to your computer and use it in GitHub Desktop.
class Project < ActiveRecord::Base
def self.find(*args)
options = args.extract_options!
if not options.include? :order
options[:order] = 'finished_at desc'
end
args.push(options)
super
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment