Read more

How to reload a belongs_to association

Dominik Schöler
December 03, 2018Software engineer at makandra GmbH

To reload a single-item association in Rails 5+, call #reload_<association>:

post.reload_author
Illustration UI/UX Design

UI/UX Design by makandra brand

We make sure that your target audience has the best possible experience with your digital product. You get:

  • Design tailored to your audience
  • Proven processes customized to your needs
  • An expert team of experienced designers
Read more Show archive.org snapshot

In older Railses you can say

post.author(true)
Posted by Dominik Schöler to makandra dev (2018-12-03 16:13)