ruby::conditions => “LIKE ___%” syntax

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.

你可能感兴趣的:(ruby::conditions => “LIKE ___%” syntax)