Skip to content

Commit

Permalink
Remove usage of alias_method_chain
Browse files Browse the repository at this point in the history
It is deprecated in Rails 5.

Fixes #367
  • Loading branch information
morgoth committed May 20, 2016
1 parent 20dd008 commit 4475012
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/rollbar/middleware/rails/show_exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@ def extract_scope_from(env)
end

def self.included(base)
base.send(:alias_method_chain, :call, :rollbar)
base.send(:alias_method_chain, :render_exception, :rollbar)
base.send(:alias_method, :call_without_rollbar, :call)
base.send(:alias_method, :call, :call_with_rollbar)

base.send(:alias_method, :render_exception_without_rollbar, :render_exception)
base.send(:alias_method, :render_exception, :render_exception_with_rollbar)
end
end
end
Expand Down

0 comments on commit 4475012

Please sign in to comment.