RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

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

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in