I have model
object implementing Mongoid::Document
model
has an attribute called name
I need to reload only name
of model
Is there something shorter than
Model.only(:name).find(model.id).name
like model.reload(:name)
I have model
object implementing Mongoid::Document
model
has an attribute called name
I need to reload only name
of model
Is there something shorter than
Model.only(:name).find(model.id).name
like model.reload(:name)
Copyright © 2021 Jogjafile Inc.
Only rewrite the reload method: