lib/rambulance/exceptions_app.rb in rambulance-1.0.0 vs lib/rambulance/exceptions_app.rb in rambulance-1.0.1
- old
+ new
@@ -10,11 +10,13 @@
end.invert
class ExceptionsApp < ActionController::Base
layout :layout_name
- if self.respond_to?(:skip_forgery_protection)
+ begin
skip_forgery_protection
+ rescue
+ # ignore errors from #skip_forgery_protection since older Rails adds this method later.
end
def self.call(env)
exception = env["action_dispatch.exception"]
status_in_words = if exception