`normalize_name` is a better name for this.

This commit is contained in:
Robin Ward 2015-04-24 10:35:03 -04:00
parent a5804d7040
commit 2562b61448
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ module UserNotificationsHelper
raw format_for_email(html)
end
def sanitized_name(name)
def normalize_name(name)
name.downcase.gsub(/[\s_-]/, '')
end
@ -62,7 +62,7 @@ module UserNotificationsHelper
SiteSetting.enable_names? &&
SiteSetting.display_name_on_posts? &&
post.user.name.present? &&
sanitized_name(post.user.name) != sanitized_name(post.user.username)
normalize_name(post.user.name) != normalize_name(post.user.username)
end
def format_for_email(html)