I created new model via scaffold and I added new action there – quick. To routes.rb I added get “photos/quick” and created the file qucik.html.erb (and it’s in the right view-directory).
If I will set to browser localhost:3000/photos/quick, I will get the error above.
In my controller it looks very simple:
def quick
end
And also in the view:
<div>this is template for quick action</div>
How is possible to get that error message? Why is run show action?
routes.rb:
FirstApp::Application.routes.draw do
resources :photos
get "photos/quick"
root :to => "photos#index"
end
Change routes to use
collectionand fix the code structure to use the blocks properly:See some documentation here about such routes