Closed khiav223577 closed 1 year ago
Something if we deep_pluck a model with assocation, Ex:
User.deep_pluck(:name, 'city' => :name)
The result hash may not contain 'city' key in that the user doesn't have a city. Ex:
{ 'name' => 'Pearl' }
We want the result always contain the key, Ex:
{ 'name' => 'Pearl', 'city' => nil }
Something if we deep_pluck a model with assocation, Ex:
The result hash may not contain 'city' key in that the user doesn't have a city. Ex:
We want the result always contain the key, Ex: