I’m getting:
malformed format string - %’
When I do something like this:
$milestone = "(target_milestone LIKE '1.0 %' OR target_milestone
LIKE ‘TBD%’)"
[…]
@cond = $open_bugs + " AND product like ‘" + $product_name + "’"
if $milestone.length > 0
@cond += " AND " + $milestone
end
[…]
@pa_bugs = Bug.find(:all,
:conditions => [ @cond
+ " AND priority = ‘" +
@pri[“priority”] + "’"
+ " AND assigned_to = ‘" +
@asn[“assigned_to”].to_s + "’"
],
:select => ‘bug_id’
)
If I take out the %, no malformed string but, also, wrong search
conditions.
Can anyone explain what I’m seeing, why, and how to fix it?
Thanks!
P.S. I searched the archives for “wildcard” and saw a few posts, but
none that spoke to this issue. Likewise, Googling
ruby rails select percent “malformed format string”
didn’t turn up anything helpful.