Skip to content

Instantly share code, notes, and snippets.

@rich
Forked from trak3r/gist:123834
Created June 4, 2009 20:50
Show Gist options
  • Select an option

  • Save rich/123838 to your computer and use it in GitHub Desktop.

Select an option

Save rich/123838 to your computer and use it in GitHub Desktop.
def self.included(receiver)
receiver.named_scope :latest_before, lambda {|time| {:conditions => ['created_at < ?', time]}}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment