fix #1429 by correctly handling tags with dots

This was a very old regression. This used to work before the rails 3.2 upgrade... Added tests 
to prevent future unnoticed breakage
This commit is contained in:
Reinier Balt 2013-06-03 15:17:38 +02:00
parent 40d0610b5d
commit 9a6ab05eef
4 changed files with 68 additions and 10 deletions

View file

@ -101,7 +101,12 @@ Tracksapp::Application.routes.draw do
post 'add_predecessor'
end
end
match 'todos/tag/:name' => 'todos#tag', :as => :tag
# match /todos/tag and put everything in :name, including extensions like .m and .txt.
# This means the controller action needs to parse the extension and set format/content type
# Needed for /todos/tag/first.last.m to work
match 'todos/tag/:name' => 'todos#tag', :as => :tag, :format => false, :name => /.*/
match 'tags.autocomplete' => "todos#tags", :format => 'autocomplete'
match 'todos/done/tag/:name' => "todos#done_tag", :as => :done_tag