Mar*_*ear 0 ruby-on-rails ruby-on-rails-3
嘿伙计们试图做一个简单的查询,在那里我找到特定属性为零的所有记录.在这种情况下...
irb(main):009:0> Registration.where(:registration_cancellation_token != nil)
Registration Load (0.2ms) SELECT `registrations`.* FROM `registrations` WHERE (1)
=> [#<Registration id: 1, orientation_id: 13, first_name: "mark", last_name: "Busta", email: "marklocklear@gmail.com", student_id: "3232333", phone: "3884448333", registration_cancellation_token: nil, registration_cancelled_at: nil, checked_in: false, created_at: "2014-02-20 13:46:31", updated_at: "2014-02-20 13:46:31">]
Run Code Online (Sandbox Code Playgroud)
...但查询返回所有注册.任何帮助赞赏...