Skip to content

Instantly share code, notes, and snippets.

@adrianpike
Created January 27, 2012 22:59
Show Gist options
  • Save adrianpike/1691423 to your computer and use it in GitHub Desktop.
Save adrianpike/1691423 to your computer and use it in GitHub Desktop.
class Stuff
def to_sql
'where `stuff` = "bar"'
end
end
Foo.where(Stuff.new)
# other magic
Foo.where(Foo.table[:stuff].gteq(5.days.ago))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment