Skip to content

Commit

Permalink
Fixes issue #14, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
carstengehling committed May 30, 2015
1 parent 938977d commit f455c53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ All it really does is to take the path and downcase it before dispatching. Query

== Changelog

=== 1.1.3

Fixes issue #14. If Devise/Warden is used in the Rails app, RouteDowncaser::DowncaseRouteMiddleware needs to be inserted before Warden::Manager in the middleware list.

=== 1.1.2

POST requests must never result in a redirect, even if the config.redirect is true
Expand Down
6 changes: 5 additions & 1 deletion lib/route_downcaser/railtie.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module RouteDowncaser
class Railtie < Rails::Railtie
initializer "add_downcase_route_middleware" do |app|
app.config.middleware.use "RouteDowncaser::DowncaseRouteMiddleware"
# For some reason, RouteDowncaser needs to be inserted before Devise/Warden, if Devise is used
# But since it is not possible to test for the presence of a specific middleware module,
# we instead insert RouteDowncaser before a middleware module, that a) is always present
# and b) is inserted before Devise/Warden is
app.config.middleware.insert_before 'Rack::Head', 'RouteDowncaser::DowncaseRouteMiddleware'
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/route_downcaser/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RouteDowncaser
VERSION = "1.1.2"
VERSION = "1.1.3"
end

0 comments on commit f455c53

Please sign in to comment.