diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-23 11:26:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2017-07-23 11:26:04 +0000 |
commit | d74f0bfd5c53962e332c2dd4d30dafaa1105b92b (patch) | |
tree | f3eaf66d67c3a87fb34340561bf188d364de623c /config/routes.rb | |
parent | 41bb302594b48152b87c92f196c915f499093bbf (diff) | |
download | redmine-d74f0bfd5c53962e332c2dd4d30dafaa1105b92b.tar.gz redmine-d74f0bfd5c53962e332c2dd4d30dafaa1105b92b.zip |
Merged rails-5.1 branch (#23630).
git-svn-id: http://svn.redmine.org/redmine/trunk@16859 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/config/routes.rb b/config/routes.rb index d28b6afa1..a08ca1094 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -242,10 +242,6 @@ Rails.application.routes.draw do get 'projects/:id/repository/:repository_id/statistics', :to => 'repositories#stats' get 'projects/:id/repository/:repository_id/graph', :to => 'repositories#graph' - get 'projects/:id/repository/:repository_id/changes(/*path)', - :to => 'repositories#changes', - :format => false - get 'projects/:id/repository/:repository_id/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/:repository_id/revision', :to => 'repositories#revision' post 'projects/:id/repository/:repository_id/revisions/:rev/issues', :to => 'repositories#add_related_issue' @@ -255,17 +251,13 @@ Rails.application.routes.draw do get "projects/:id/repository/:repository_id/revisions/:rev/#{action}(/*path)", :controller => 'repositories', :action => action, - :format => false, - :constraints => {:rev => /[a-z0-9\.\-_]+/} + :format => 'html', + :constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/} end get 'projects/:id/repository/statistics', :to => 'repositories#stats' get 'projects/:id/repository/graph', :to => 'repositories#graph' - get 'projects/:id/repository/changes(/*path)', - :to => 'repositories#changes', - :format => false - get 'projects/:id/repository/revisions', :to => 'repositories#revisions' get 'projects/:id/repository/revisions/:rev', :to => 'repositories#revision' get 'projects/:id/repository/revision', :to => 'repositories#revision' @@ -275,30 +267,32 @@ Rails.application.routes.draw do get "projects/:id/repository/revisions/:rev/#{action}(/*path)", :controller => 'repositories', :action => action, - :format => false, - :constraints => {:rev => /[a-z0-9\.\-_]+/} + :format => 'html', + :constraints => {:rev => /[a-z0-9\.\-_]+/, :path => /.*/} end %w(browse entry raw changes annotate diff).each do |action| get "projects/:id/repository/:repository_id/#{action}(/*path)", :controller => 'repositories', :action => action, - :format => false + :format => 'html', + :constraints => {:path => /.*/} end %w(browse entry raw changes annotate diff).each do |action| get "projects/:id/repository/#{action}(/*path)", :controller => 'repositories', :action => action, - :format => false + :format => 'html', + :constraints => {:path => /.*/} end - get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => false - get 'projects/:id/repository/show/*path', :to => 'repositories#show', :format => false + get 'projects/:id/repository/:repository_id/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/} + get 'projects/:id/repository/show/*path', :to => 'repositories#show', :format => 'html', :constraints => {:path => /.*/} get 'projects/:id/repository/:repository_id', :to => 'repositories#show', :path => nil get 'projects/:id/repository', :to => 'repositories#show', :path => nil # additional routes for having the file name at the end of url - get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment' + get 'attachments/:id/:filename', :to => 'attachments#show', :id => /\d+/, :filename => /.*/, :as => 'named_attachment', :format => 'html' get 'attachments/download/:id/:filename', :to => 'attachments#download', :id => /\d+/, :filename => /.*/, :as => 'download_named_attachment' get 'attachments/download/:id', :to => 'attachments#download', :id => /\d+/ get 'attachments/thumbnail/:id(/:size)', :to => 'attachments#thumbnail', :id => /\d+/, :size => /\d+/, :as => 'thumbnail' @@ -376,7 +370,7 @@ Rails.application.routes.draw do match 'uploads', :to => 'attachments#upload', :via => :post - get 'robots.txt', :to => 'welcome#robots' + get 'robots', :to => 'welcome#robots' Dir.glob File.expand_path("#{Redmine::Plugin.directory}/*") do |plugin_dir| file = File.join(plugin_dir, "config/routes.rb") |