[Rails] Re: Simple search form with restful routes?

2009-03-12 Thread Jl Smith
After updating my tickets resources in my routing config like Andrew suggested, does anyone know how I might pass the :id param to the show method from the new search method so I don't have to re-write the code in the show method? All I want to do is reuse the show method...it's doing exactly

[Rails] Re: Simple search form with restful routes?

2009-03-07 Thread JL Smith
Yeah, I ran 'rake routes' to study the routing but I just didn't think I'd have to add to it. I specified the 'get' method to ticket_path with an ID param coming in...I don't understand why that wouldn't work. So the search method will now render the show method? or redirect_to? or what? Thanks

[Rails] Re: Simple search form with restful routes?

2009-03-06 Thread Andrew Bloom
ticket_path is expecting you to pass the ID of the ticket you are looking for. Something like this: ticket_path(123) Run 'rake routes' to get a good idea of what each named route is doing. What you need is something like this: # tickets_controller def search show end # routes.rb map.resource