lib/airbrake/rails/controller_methods.rb in airbrake-3.1.12 vs lib/airbrake/rails/controller_methods.rb in airbrake-3.1.13
- old
+ new
@@ -52,13 +52,17 @@
end
end
def airbrake_session_data
- if session.respond_to?(:to_hash)
- session.to_hash
+ if session
+ if session.respond_to?(:to_hash)
+ session.to_hash
+ else
+ session.data
+ end
else
- session.data
+ {:session => 'no session found'}
end
end
def airbrake_request_url
url = "#{request.protocol}#{request.host}"