The routes model hooks not firing when you pass an object to a link to rather than a param is really subtle and sneaky
-
-
Replying to @mattmcmanus @mixonic
The general arising Best Practice here is to only pass params (numbers/strings) to link-to/transitionTo
2 replies 0 retweets 2 likes -
This forces all paths to go through the model hook; it probably should have been designed that way from the beginning but alas
2 replies 0 retweets 0 likes -
Replying to @amatchneer @machty and
I don't agree with this and I also don't think we should be giving this advice if we're not willing to document it.
2 replies 0 retweets 1 like -
What specifically do you disagree with?
3 replies 0 retweets 0 likes -
Replying to @amatchneer @machty and
I disagree that "only pass strings" is a best practice. Also disagree that we should have done that from the beginning.
3 replies 0 retweets 0 likes -
Agree that passing models should work the way you describe, but in the absence of that functionality, pass params seems like sound advice?
1 reply 0 retweets 0 likes -
Replying to @amatchneer @machty and
Or use afterModel? Why not fix passing models?
1 reply 0 retweets 0 likes -
Duplicating serialization at every link-to is no bueno. We should fix `model`.
1 reply 0 retweets 1 like -
Agree we should fix, but single `model` hook pathway via params approach is far less worse evil.
1 reply 0 retweets 1 like
Let's fix. As Mr. Router and Mr. RFC, you are uniquely positioned.
-
-
ohhhhh alright
0 replies 0 retweets 8 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.