我的范围是
scope :new_users, :conditions => {['look IS NULL OR look = ?',false]}
但我收到错误消息:
syntax error, unexpected '}', expecting tASSOC
我哪里错了?请纠正它。我正在使用rails3.2
答案 0 :(得分:0)
你可以试试这个
scope :new_users, where('look IS NULL OR look = ?', false)
答案 1 :(得分:0)
修改您的范围,如:
scope :new_users, :conditions => {('look IS NULL OR look = ?',false)}