Hi all, I'm making a search features for a record with a keywords field (keywords is a string right now), and my routing is having consistency troubles. What I desire is: > localhost:3000/controller/search/:keyword
I would like this form to be obeyed for both form-submitted searches and the HTML links I generate. However, :method => :get is not being obeyed, and my helper method returns "search?keyword=foo+bar". My routing is RESTful, and I have added the search action to the map.resources call. If I call "controller/search/keyword" directly I get this error: > undefined method `index_url' for #<SermonsController:0x4a0e1c4> I find this curious. My routing is before the map.connect call for the standard format. Here's my map call: > map.resources :sermons, :collection => { :search => :get } If I map the following line, I get a 500 error. > map.search_sermons 'sermons/search/:keyword', > :controller => :sermons, :action => :search As you can guess this is confusing me. Have I done anything wrong? My links are forced into the "controller/search?keyword=foo+bar" format, and my forms remain POST methods no matter what I try to override them with. How should I go about routing this? Thanks, Robert P.S. I currently have the site working with what I have, but I'd really like to make it consistent with the rest of the site's routing scheme. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---