Problem for REST URL Helper Function

Hi,
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’
end
end

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
#<#Class:0x9114758:0x910e0d8>”

Can anyone tell me What is the wrong with code?

Thanks,
Mike

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