inside my routes.rb I have resources: x
but I also have another controller y, and in one of the pages I want to link to a ‘new’ action in controller x.
usually If I have a match statement defined in routers like
match 'signin', to: 'session#new'
I can go
<%= link_to "text", signin_path %>
but what do I do when I use resources as with controller x and need to link to the new action, without having to write match statements out in routes.rb
Thanks
And you can view all your routes by type
rake routesin your app directory.And if you want change default path you can write in config/routes.rb smth like this:
And then create link: