lib/airbrake/rails/controller_methods.rb in airbrake-3.1.7 vs lib/airbrake/rails/controller_methods.rb in airbrake-3.1.8
- old
+ new
@@ -73,9 +73,10 @@
end
def airbrake_current_user
user = begin current_user rescue current_member end
h = {}
+ return h if user.nil?
Airbrake.configuration.user_attributes.map(&:to_sym).each do |attr|
h[attr.to_sym] = user.send(attr) if user.respond_to? attr
end
h
rescue NoMethodError, NameError