Skip to content

Commit

Permalink
Fix for deprecation message when trying to pass a string an not a cla…
Browse files Browse the repository at this point in the history
…ss to the middleware builder for Rails 5
  • Loading branch information
Rob White committed Jul 6, 2016
1 parent 8aa089b commit 66c64ad
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/devise_cas_authenticatable/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
module DeviseCasAuthenticatable
class Railtie < ::Rails::Railtie
initializer "devise_cas_authenticatable.use_rack_middleware" do |app|
app.config.middleware.use "DeviseCasAuthenticatable::SingleSignOut::StoreSessionId"
if Rails::VERSION::MAJOR < 5
app.config.middleware.use "DeviseCasAuthenticatable::SingleSignOut::StoreSessionId"
else
app.config.middleware.use DeviseCasAuthenticatable::SingleSignOut::StoreSessionId
end
end
end
end

0 comments on commit 66c64ad

Please sign in to comment.