When working with any structure with which you are not 100% familiar, I found it advisable to try to understand and clear any extraneous warnings, if only you have more chances to notice real errors when they occur.
Recently, I get the following:
DEPRECATION WARNING: @model will not longer be implicitly assigned to model
It seems that nothing has broken in my current codebase, but I'm only worried because I don't fully understand the warning. I thought it was best not to use @model in your particles.
However, this warning is triggered every time this particular βmodelβ appears in its partial.
How can I explicitly assign it? I created @model in the controller and then call the partial collection (realizing this as the "rails" method).
Can someone explain what is happening here for me and what are the best practices in this situation? I'm not worried yet, but miles of warning tend to drown out the real result from my application.
source share