Skip to content

Instantly share code, notes, and snippets.

@nicolasblanco
Created January 18, 2013 14:09
Show Gist options
  • Select an option

  • Save nicolasblanco/4564747 to your computer and use it in GitHub Desktop.

Select an option

Save nicolasblanco/4564747 to your computer and use it in GitHub Desktop.
1.9.3-p286 :148 > CollectionItem.find("50f86e333fb21614e9010910").updated_at
=> 2013-01-18 15:02:42 +0100
1.9.3-p286 :149 > CollectionItem.tire.search { filter :term, { _id: "50f86e333fb21614e9010910" } }.results.first["updated_at"]
=> "2013-01-18T15:02:42+01:00"
1.9.3-p286 :150 > CollectionItem.tire.search { filter :range, { updated_at: { from: 10.hours.ago, to: Time.now } } }.total_entries
=> 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment