tweak serialized attribute search. refs #1447
authorTom Clegg <tom@clinicalfuture.com>
Wed, 27 Mar 2013 00:43:23 +0000 (17:43 -0700)
committerTom Clegg <tom@clinicalfuture.com>
Wed, 27 Mar 2013 00:43:23 +0000 (17:43 -0700)
app/controllers/application_controller.rb

index eae4ede0ae99c0817460ff98503f46e8f87f2e7a..a80d93e42feb9b07c69589bf38b20b3f65799b6e 100644 (file)
@@ -79,8 +79,8 @@ class ApplicationController < ActionController::Base
             # Not quite the same thing as "equal?" but better than nothing?
             value.each do |k,v|
               if v.is_a? String
-                conditions[0] << " and #{table_name}.#{attr} like ?"
-                conditions << "%:#{k}: #{v}%"
+                conditions[0] << " and #{table_name}.#{attr} ilike ?"
+                conditions << "%#{k}%#{v}%"
               end
             end
           end