sql icon indicating copy to clipboard operation
sql copied to clipboard

Merge joined model instances with preloaded direct references

Open vladfaust opened this issue 6 years ago • 0 comments

post = Post.where(id: 1).join(:author) { |x| x.select(:id, :name) }
pp post # <Post @author=<User @id=42 @name="John"> @content="...">

Should work without :id.

vladfaust avatar Mar 05 '19 21:03 vladfaust