Pluck deeply into nested associations
pluck is great when you simply want the attributes without the need of model construction. But if you want to pluck associated models’ attributes, you unfortunately can’t. deep_pluck allow you to pluck deeply into nested associations without loading a bunch of records. And DRY up your code when using #as_json.
Post a comment