The method visibility of sanitize_sql_array appears to have changed in Rails 4. I had to do this to my models allow pg_search to work.
class << self; public :sanitize_sql_array; end
Perhaps scope_options could be updated to reflect this change?
Long-term I want to use arel to build all the SQL, so that we don't have to ask the database adapter to do so much escaping.
For now, we can change it to use #send, but we are really just pushing the problem down the road until this private method changes without warning in a later version.
Also just to be clear on the upgrade plans, I will accept pull requests that help support Rails 4 without breaking Rails 3. But I don't plan on actively updating pg_search until a release candidate comes out.
Thanks for letting me know about this so that I can get to it when the time comes.
+1 It happened to mee too...
#87 fixed this on the HEAD of the Git repo, but a new gem hasn't been released yet.
I'll get a release out this weekend that has the fix, until then you could do this in your Gemfile
gem "pg_search", :github => "Casecommons/pg_search"
Be sure to remove the :github part once the gem is released to go back to the Rubygems version.
I'm reopening this because I have a fix coming soon that will remove all usages of sanitize_sql_array
Refactor TSearch to remove sanitize_sql_array call