Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Routes
- map.thumbnail 'download/thumbnail/:width/:height/:filename',
- :controller => 'download',
- :action => 'thumbnail',
- :requirements => {
- :width => /\d+/,
- :height => /\d+/
- }
- ## Huh?
- When I try to go to <mydomain.com>/download/thumbnail/80/60/d9Ym7kkUmr24gXadaBlqsS.jpg I get the error:
- Routing Error
- no route found to match "/download/thumbnail/70/53/d9Ym7kkUmr24gXadaBlqsS.jpg" with {:method=>:get}
- ## And it fixes with...
- If I add :filename => /.+/ to the requirements hash it then works. WTH?
Add Comment
Please, Sign In to add comment