Skip to content

Commit

Permalink
Rails 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
trym committed Mar 9, 2010
1 parent 259733e commit b585179
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions init.rb
@@ -1,3 +1,7 @@
if RAILS_ENV == 'production'
ActionController::Dispatcher.middleware.use Hassle
end
if (defined? Rails.env ? Rails.env : RAILS_ENV) == "production"
if defined? Rails.configuration && defined? Rails.configuration.middleware
Rails.configuration.middleware.use(Hassle)
elsif defined? ActionController::Dispatcher && defined? ActionController::Dispatcher.middleware
ActionController::Dispatcher.middleware.use Hassle
end
end

0 comments on commit b585179

Please sign in to comment.