A very basic question I know, but I'm really struggling. If I use a link_to with the current controller's path then I get the id as a parameter but if I instead use a path to a different controller then I get a format instead.
So from the same view I get the following paths generated by the team show view:
team/2/add/ and player/add.2
Hi Mark, I'm with Jacob. If you could show the code that would be great.
Also, what are you trying to do? Do you have a single page with multiple objects executing different types of CRUD functionality? If thats the case then perhaps you should use a view object that is a single model that represents all the models on that page. That way you can maintain RESTful routes and not have to try and share object id's accross controllers.
I'm sure Chris has some content around executing this kind of strategy. If not, I'm happy to share some additional context if need be.
Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.