您的位置:首页 > 编程语言 > Ruby

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

2013-09-12 17:46 288 查看
The following gives an error:
ArgumentError:
 malformed format string - %'
:
[code] named_scope :sales, :conditions => ["rolename LIKE 'salesteam%'"]


The following is OK:
[code] named_scope :sales, :conditions => ["rolename LIKE 'salesteam%%'"]


I am wondering where I can find the documentation for the
%%
(double
%) syntax.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: