Ruby – Problem while scaffold – routes.rb needs to have the action name

I got a serious problem when scaffold in ruby and couldn’t get the route working with different action rather than auto generated actions. I had controller name search and action zea. It was working fine while I hit it. But while create an action named nokogiri, it wasnt working. I searched it to google and stackoverflow with ruby – problem with routes.rb in scaffold and got some results. It suggested to add a line in routes.rb

get "searches/nokogiri"

But it wasnt working simply because of the serialized sequence of the line of code for custom action. it was previously

resources :searches
  get "searches/nokogiri"

But it should be

get "searches/nokogiri"
resources :searches

get should be before resources, It is working fine right now.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>