Navigation Menu

Skip to content

Commit

Permalink
rails 3.0 and 3.1 compatybility
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Pankowecki (Gavdi) committed Jul 16, 2011
1 parent a18d03d commit c4eb010
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/active_reload.rb
Expand Up @@ -9,13 +9,7 @@ class Railtie < ::Rails::Railtie
end # Railtie

def self.replace?
call_callbacks = if Rails.version >= "3.1"
ActionDispatch::Callbacks._call_callbacks
else
ActionDispatch::Callbacks.instance_variable_get(:@_call_callbacks)
end

!Rails.application.config.cache_classes && replace_proc?(call_callbacks.last)
!Rails.application.config.cache_classes && replace_proc?(ActionDispatch::Callbacks._call_callbacks.last)
end

def self.replace_proc?(last)
Expand Down

0 comments on commit c4eb010

Please sign in to comment.