Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created July 26, 2010 16:24
Show Gist options
  • Select an option

  • Save bernerdschaefer/490791 to your computer and use it in GitHub Desktop.

Select an option

Save bernerdschaefer/490791 to your computer and use it in GitHub Desktop.
Person.published
#<Mongoid::Scope:0x18e5a70
@conditions=
{:where=>{:published_at=>{"$lt"=>Mon Jul 26 11:25:19 -0500 2010}}},
@parent=Person>
Person.published.published_on(3.days.ago, 1.days.ago)
#<Mongoid::Scope:0x18e2ec4
@conditions=
{:where=>
{:published_at=>
{"$gte"=>Fri Jul 23 11:25:19 -0500 2010,
"$lte"=>Sun Jul 25 11:25:19 -0500 2010}}},
@parent=
#<Mongoid::Scope:0x18e3b80
@conditions=
{:where=>{:published_at=>{"$lt"=>Mon Jul 26 11:25:19 -0500 2010}}},
@parent=Person>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment