-
Notifications
You must be signed in to change notification settings - Fork 302
Home
Norman Snyder edited this page May 24, 2024
·
10 revisions
Various tips, tricks and guides should be posted here.
Creating Objects
Fetching Objects
Retrieving ALL objects of a certain Entity type
With Ruby 2.6, to find a customer such as O'shea, we had to gsub like this:
escaped_name = (family.qb_display_name || "").gsub("'", "\\\\'")
Having just upgraded to Ruby 3.0.7, I found that searching raised this error:
Error parsing query: QueryParserError: Encountered " "s "" at line 1, column 59. Was expecting one of: ... "iterator" ... "maxresults" ... ... "order" ... "orderby" ... "startposition" ...
To overcome the problem, I used
escaped_name = (family.qb_display_name || "").gsub("'", "\'")