Skip to content

Commit

Permalink
Redmine 1.3 and 2.0 compatible routes; file cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danmunn committed Jun 6, 2012
1 parent a9049f3 commit 42cefa6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 32 deletions.
13 changes: 11 additions & 2 deletions config/routes.rb
@@ -1,3 +1,12 @@
RedmineApp::Application.routes.draw do
get 'attachments/download_inline/:id/:filename', :controller => 'attachments', :action => 'download_inline', :id => /\d+/, :filename => /.*/
if Gem::Version.new("3.0") > Gem::Version.new(Rails.version) then
#Redmine 1.x
ActionController::Routing::Routes.draw do |map|
map.connect 'attachments/download_inline/:id/:filename', :controller => 'attachments', :action => 'download_inline', :id => /\d+/, :filename => /.*/
end

else
#Redmine 2.x
RedmineApp::Application.routes.draw do
get 'attachments/download_inline/:id/:filename', :controller => 'attachments', :action => 'download_inline', :id => /\d+/, :filename => /.*/
end
end
2 changes: 0 additions & 2 deletions lang/en.yml

This file was deleted.

28 changes: 0 additions & 28 deletions lib/attachments_controller_patch.rb

This file was deleted.

0 comments on commit 42cefa6

Please sign in to comment.