giniedp/fancygrid — pull request #20 by kris-luminar (2014-08-07 20:10:36+00:00)
Title: fix date sorting in PostgresSQL

fix for multiple errors in production like this:

```
An ActiveRecord::StatementInvalid occurred in bonds#index:

PG::UndefinedFunction: ERROR: function lower(date) does not exist
LINE 1: ...bonds" WHERE "bonds"."agency_id" = 7291 ORDER BY LOWER(bond...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
: SELECT bonds.bond_number, bonds.bond_status, bonds.type, bonds.effective_date, bonds.expiration_date, bonds.principal_name, bonds.premium, bonds.commission, bonds.bond_amount FROM "bonds" WHERE "bonds"."agency_id" = 7291 ORDER BY LOWER(bonds.expiration_date) desc LIMIT 100 OFFSET 300
vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.19/lib/active_record/connection_adapters/postgresql_adapter.rb:1163:in `async_exec'