标签: ruby-on-rails mongoid
ActiveRecord有feature
class User < ActiveRecord::Base has_many :birthday_events, ->(user) { where starts_on: user.birthday}, class_name: 'Event' end
但是当我尝试在mongoid关联中使用它时,我得到错误: “没有将Proc隐式转换为Hash”
mongoid中有这个功能的替代品吗?