6
第一次在Rails項目中使用Mongoid。 什麼擴展.NE代表一個作用域方法,像這樣:Mongoid extension .ne
scope :subscribed, -> {
where(:unsubscribed.ne => true)
}
第一次在Rails項目中使用Mongoid。 什麼擴展.NE代表一個作用域方法,像這樣:Mongoid extension .ne
scope :subscribed, -> {
where(:unsubscribed.ne => true)
}
這對"not equal"選擇操作。