Skip to content

Commit

Permalink
symbolize user's keys
Browse files Browse the repository at this point in the history
proper fallback to current_member
  • Loading branch information
shime committed Sep 11, 2012
1 parent ec07ea7 commit f7b2c44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/airbrake/rails/controller_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f7b2c44

Please sign in to comment.