Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

minor fixing to audits search link, closes #1700

  • Loading branch information...
commit e2217aa6294619cadbefba4f35f23f4f902f82f8 1 parent a3c76a8
@ohadlevy authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/helpers/audits_helper.rb
View
6 app/helpers/audits_helper.rb
@@ -77,9 +77,9 @@ def audit_action_name audit
end
def audit_user audit
- username = audit.username.gsub('User', '') unless audit.username.nil?
- login = audit.user.login rescue username.to_s.downcase
- link_to icon_text('user', username), hash_for_audits_path(:search => "user = #{login}") if login
+ return if audit.username.nil?
+ login = audit.user.login rescue nil # aliasing the user method sometimes yields strings
+ link_to(icon_text('user', audit.username.gsub('User', '')), hash_for_audits_path(:search => login ? "user = #{login}" : "username = \"#{audit.username}\""))
end
def audit_time audit
Please sign in to comment.
Something went wrong with that request. Please try again.