This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the rails category.
Last Updated: 2024-10-12
I had the following code in a model:
delegate :email, :password, :password_confirmation, to: :user
I assumed and wrote code under this assumption that I could do obj.user.email = x
This wasn't the case.
Do not assume because you get getter methods you also get setter methods.