Skip to content

Instantly share code, notes, and snippets.

@trak3r
Created June 4, 2009 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trak3r/123834 to your computer and use it in GitHub Desktop.
Save trak3r/123834 to your computer and use it in GitHub Desktop.
def self.included(receiver)
receiver.class_eval <<-RUBY
named_scope :latest_before, lambda {|time| {:conditions => ['created_at < ?', time]}}
RUBY
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment