Skip to content

Instantly share code, notes, and snippets.

@noahhendrix
Created August 9, 2010 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noahhendrix/515931 to your computer and use it in GitHub Desktop.
Save noahhendrix/515931 to your computer and use it in GitHub Desktop.
Contact.limit(5).search({ :deleted_at_is_blank => true })
ActiveRecord::StatementInvalid: PGError: ERROR: invalid input syntax for type timestamp: ""
: SELECT "contacts".* FROM "contacts" WHERE (("contacts"."deleted_at" IS NULL OR "contacts"."deleted_at" = '')) LIMIT 5
Contact.limit(5).where(:deleted_at => nil).to_sql
=> "SELECT \"contacts\".* FROM \"contacts\" WHERE (\"contacts\".\"deleted_at\" IS NULL) LIMIT 5"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment