-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
With the changes to pluck and distinct in MONGOID-5028, localized fields no longer return the entire translation hash on pluck and distinct:
# Old Behavior Dictionary.all.pluck(:description) # => {"de"=>"deutsch-text", "en"=>"english-text"} # New Behavior Dictionary.all.pluck(:description) # => "deutsch-text"
This ticket is to provide the ability for users to pluck or distinct a _translations field so that they can get the entire translations hash.
Also, we added dot navigation to pluck and distinct so:
# Old Behavior Band.pluck("labels.sales") # => [{ 'sales' => "1E2" }] # New Behavior Band.pluck("labels.sales") # = [BigDecimal("1E2")]
- is related to
-
MONGOID-5028 demongoize custom field on pluck
- Closed