Percent sign wildcard ActiveRecord error
-
Mislav
- Assigned user changed from Chris Wanstrath to Mislav
- State changed from new to open
- Title changed from Percent sign wildcard query error to Percent sign wildcard ActiveRecord error
Hey Adrian,
Thanks for the stack trace. Can I have the line where you call paginate_by_sql also?
While I track this down, please try if the same thing works with ActiveRecord from Rails 2.0. Could be an ActiveRecord issue.
-
Adrian
MIslav,
Please close this ticket. I am a knucklehead coming to Ruby from Python and didn't realize I had to put two percent signs together in order to prevent it from looking for a format string.
Thanks again for a super plug-in.
-
Adrian
I had a query that looked like:
sql = "select * from mytable where name like '%hello%'"
but my query should have been written:
sql = "select * from mytable where name like '%%hello%%"
On Jan 4, 2008, at 10:44 AM, Lighthouse wrote:
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.