Problem for REST URL Helper Function

I am using rails 3 for my application.
My problem is REST routing helper function is not working.

In my routes.rb I have following code:-

resources :user do
collection do
get ‘search_form’, ‘search’

I have index.html.erb like as follows:-

<%=link_to "Search", search_form_user_url%>

When I run the application I am getting following error:-

“undefined local variable or method `search_form_user_url’ for

Can anyone tell me What is the wrong with code?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs