Search on id doesn't work on heroku
Reported by Paul Sherwood | August 2nd, 2012 @ 11:54 PM
If I use set_search_columns with :id (or another integer field), then search breaks because postgres won't accept a string comparison for an integer column.
My fix is as follows in line 46 of hobo.rb:
column_queries = search_target.search_columns.map { |column| column == "id" ? "CAST(#{column} AS varchar) #{like_operator} ?" : "#{column} #{like_operator} ?" }
I think this problem applies for all versions of hobo, and may or may not apply for other dbs, but my fix has been specifically tested with 1-3-stable, and works locally with sqlite and on heroku.
I'll submit a pull request via github, but please feel free to disregard or implement another way,
Comments and changes to this ticket
-
Bryan Larsen September 4th, 2012 @ 04:22 PM
Merged into master, still needs to be merged into 1-3-stable.
-
Evelyn Wattson February 21st, 2024 @ 11:19 AM
Hi guys, I am Evelyn Wattson, I am a fresh graduate and live in Canada. Finding a job in a country like Canada is not an easy task, you need a resume that is written perfectly so, that the ATS (Applicant Tracking System) will approve it. For writing a resume I chose Resume Writing Canada because the reviews given by people to them were very satisfactory and I like their service. The resume that was written by them was amazing and able to catch the attention of hiring officials and recruiters.
-
Michelle Burns March 18th, 2024 @ 03:02 AM
tiny fishing is suitable for everyone due to its accessibility, simplicity, and potential for enjoyment. Whether you are a beginner or an experienced angler, Tiny Fishing offers a unique and rewarding fishing experience that can be enjoyed by people of all ages and skill levels.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป