Reputation: 51941
The following gives an error: ArgumentError: malformed format string - %'
:
named_scope :sales, :conditions => ["rolename LIKE 'salesteam%'"]
The following is OK:
named_scope :sales, :conditions => ["rolename LIKE 'salesteam%%'"]
I am wondering where I can find the documentation for the %%
(double %) syntax.
Upvotes: 1
Views: 2404
Reputation: 8807
Shouldn't it be like this?
named_scope :sales, :conditions => ["rolename LIKE ?", 'salesteam%']
Upvotes: 3