1

我的范围是

scope :new_users, :conditions => {['look IS NULL OR look = ?',false]}

但我收到错误消息:

syntax error, unexpected '}', expecting tASSOC

我哪里错了?请更正。我正在使用 rails3.2

4

2 回答 2

0

你可以试试这个

scope :new_users, where('look IS NULL OR look = ?', false)
于 2013-02-23T19:39:05.213 回答
0

修改您的范围,如:

scope :new_users, :conditions => {('look IS NULL OR look = ?',false)}
于 2013-02-23T19:42:53.133 回答