Skip to content
This repository has been archived by the owner on Nov 11, 2017. It is now read-only.

Commit

Permalink
more sane way of testing for rails 3 controller methods
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecrum authored and Jason Morrison committed Oct 18, 2010
1 parent 28a0ebc commit 631759b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hoptoad_notifier/rails/controller_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def notify_hoptoad(hash_or_exception)
end

def hoptoad_local_request?
if defined?(::Rails::Railtie) #test for Rails 3
if defined?(::Rails.application.config)
::Rails.application.config.consider_all_requests_local || request.local?
else
consider_all_requests_local || local_request?
Expand Down

0 comments on commit 631759b

Please sign in to comment.