シナリオ: Rails + Mongoid + Rabl
私は次のようなクラスを持っています
class User
has_many :cards
field :name
と
class Card
belongs_to :user
field :anotheruser, type:Moped::BSON::ObjectId
私は rabl 初心者なので、そこにいる rabl の専門家への私の質問は、rabl から直接 BSON:ObjectId を介して「別のユーザー」オブジェクトを照会するエレガントな方法があるということです。確かにコントローラーで魔法を実行できますが、利用可能であれば非常に便利な機能です。
ありがとう。
P