The raw route with the bound parameter is not clear. Do not get your behavior

I have a route defined on my routes. rb

get ':conroller(/:action)' => 'show/show_all#test' 

and in my ruby ​​file I have the following link

 <td><%= link_to 'Test non resourcefull route:show', :controller="fdsfdsf" :action="fdsfds" %></td>`enter code here` 

after following the link I can see mine

test.html.erb

even if the spelling of the controller is incorrect in determining the route. But if I correct the spelling on "Controller", I get the following error:

uninitialized constant ShowAllController.

Please clear this behavior.

+4
source share
1 answer

Please refer to this URL http://guides.rubyonrails.org/routing.html#non-resourceful-routes .

Let this link help you

0
source

Source: https://habr.com/ru/post/1499318/


All Articles