Duane J. wrote:
If that doesn’t work, can you help me understand what’s happening
(or not happening), e.g. logs or otherwise? It might help if you
could send some query strings to the log, too–just to see what it’s
doing underneath.
Duane,
Thanks for responding!
Removing ‘searches_on’ all together didn’t work. It gives this error:
ArgumentError in Foobar#search
wrong number of arguments (1 for 0)
RAILS_ROOT: ./script/…/config/…
Application Trace | Framework Trace | Full Trace
#{RAILS_ROOT}/lib/search.rb:18:in type' #{RAILS_ROOT}/lib/search.rb:18:insearchable_fields’
#{RAILS_ROOT}/lib/search.rb:18:in select' #{RAILS_ROOT}/lib/search.rb:18:insearchable_fields’
#{RAILS_ROOT}/lib/search.rb:55:in search' #{RAILS_ROOT}/app/controllers/foobar_controller.rb:58:insearch’
The only query showing my MySQL query log from this error is:
SHOW FIELDS FROM foobar
When I specify the fields for searches_on, the query log shows the
additional query:
SELECT * FROM foobar WHERE ((UCASE(title) LIKE ‘%SEARCHSTRING%’ OR
UCASE(name) LIKE ‘%SEARCHSTRING%’ OR UCASE(blah) LIKE ‘%SEARCHSTRING%’
If it matter, I’m using MySQL 5.0. But I don’t think that should matter
here.
Thank you Duane.
Matt
–
Matt C. Wagner
Information Security Analyst
Network Intrusion Detection
Security Operations Center
Corporate Information Security
Wells Fargo Bank