Posted about 3 years ago. Visible to the public. Repeats. Linked content.

How to reload a belongs_to association

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


In older Railses you can say


By refactoring problematic code and creating automated tests, makandra can vastly improve the maintainability of your Rails application.

Owner of this card:

Dominik Schöler
Last edit:
about 1 month ago
by Dominik Schöler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Dominik Schöler to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more