Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I have a resource named Product. In my route file I have map.resources :products. Now I need to do a speed fix so that one of the product id #17 needs to be routed to another action.
- map.special '/products/17', :controller => 'products', :action => 'foobar'
- This line of code if above the other one, but I only want it to be run if it's a get reuqest. Otherwise I can't update that product using PUT etc.
- I have tried :method,:requirements,:only,:expect but still no clue how to solve it.
- Can someone give me a hint?
Add Comment
Please, Sign In to add comment