I develop a small rails app. It has a controller books. Route /books/:title shows a book with specified tit开发者_运维技巧le.
The problem is that if book contains dots . or backslashes /, application returns either error Record not found, or routing error.
How to escape these characters, so that application can show such books correctly?
Well, I have found a solution. I added a route to include query strings for show action:
match '/show', :controller => 'books', :action => 'show'
It fixed my problem.
加载中,请稍侯......
精彩评论