Hi,
Great gem, I was wondering if you might have some insight about an issue I'm having which I think is due to Arel 6.0 upgrade. In Arel 5.0 BindParams < SqlLiteral < String < Object < BasicObject , but in Arel 6.0 BindParams < Node < Object < BasicObject. I assume this is the reason I get the message:
TypeError: wrong argument type Arel::Nodes::BindParam (expected String)
from ... /vendor/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/quoting.rb:19:in escape_string' from ... /vendor/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/quoting.rb:19:inquote_string'
from ... /vendor/ruby/2.2.0/gems/pgcrypto-0.4.1/lib/pgcrypto/adapter.rb:51:in `pgcrypto_encrypt_string'
Hi, Great gem, I was wondering if you might have some insight about an issue I'm having which I think is due to Arel 6.0 upgrade. In Arel 5.0 BindParams < SqlLiteral < String < Object < BasicObject , but in Arel 6.0 BindParams < Node < Object < BasicObject. I assume this is the reason I get the message:
TypeError: wrong argument type Arel::Nodes::BindParam (expected String) from ... /vendor/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/quoting.rb:19:in
escape_string' from ... /vendor/ruby/2.2.0/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/quoting.rb:19:in
quote_string' from ... /vendor/ruby/2.2.0/gems/pgcrypto-0.4.1/lib/pgcrypto/adapter.rb:51:in `pgcrypto_encrypt_string'More info on stack exchange here: (http://stackoverflow.com/questions/29102190/postgres-9-4-pgcrypto-0-4-1-rails-4-2-0-ruby-2-2-0-quoting-expected-string) , happy to help out with a pull request but I'm not clear on how to get a value out of Arel::Nodes::BindParam. I suspect the problem line is in pgcrypto_insert line 64 and pgcrypto_update line 98 (possibly other areas as well) where you are pulling a value from Arel::Nodes::BindParam.
thanks