Permalink
Browse files

symbolize user's keys

proper fallback to current_member
  • Loading branch information...
shime committed Sep 11, 2012
1 parent ec07ea7 commit f7b2c44a5cb7f6b7d8ffe0518a04fba493e74f80
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/airbrake/rails/controller_methods.rb
@@ -73,10 +73,10 @@ def airbrake_request_url
end
def airbrake_current_user
- user = current_user || current_member
+ user = begin current_user rescue current_member end
user.attributes.select do |k, v|
/^(id|name|username|email)$/ === k unless v.blank?
- end
+ end.symbolize_keys
rescue NoMethodError, NameError
{}
end

0 comments on commit f7b2c44

Please sign in to comment.