Idea: `record.associations(reload: true)` instead of `record.associations(true)`

How do you guys feel about adding support for passing reload: true instead of just true to force reload the association?

I like the idea of that just because it removes a mystery attribute — you now know why you are passing an argument to that method, instead of passing a magic true. However, it’s definitely longer to type compared to just true.

We had some change like this before with save(false) where we promoted save(validate: false) instead.

Do you think it’s a good idea? Should I add support for it?

-Prem

Sounds like an improvement to me Prem.

+1

There is even a name for that "magic true" parameter: “The Boolean Trap” http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html

I just submitted a PR for this: https://github.com/rails/rails/pull/20883

Thanks everyone for your comment.

-Prem