Skip to content

Instantly share code, notes, and snippets.

@iain
Created November 26, 2009 14:47
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 iain/243495 to your computer and use it in GitHub Desktop.
Save iain/243495 to your computer and use it in GitHub Desktop.
Using all as a scope
class ActiveRecord::Base
named_scope :all, lambda { |*options| options.first || {} }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment