REFACTOR: Add full_url and display_name to User

Lets stop writing the same code over and over again.
This commit is contained in:
Gerhard Schlager
2022-04-13 15:52:56 +02:00
committed by Gerhard Schlager
parent 650adbe423
commit b3cda195b8
8 changed files with 22 additions and 35 deletions

View File

@ -62,7 +62,7 @@ class SystemMessage
{
site_name: SiteSetting.title,
username: @recipient.username,
user_preferences_url: "#{Discourse.base_url}/u/#{@recipient.username_lower}/preferences",
user_preferences_url: "#{@recipient.full_url}/preferences",
new_user_tips: I18n.with_locale(@recipient.effective_locale) { I18n.t('system_messages.usage_tips.text_body_template', base_url: Discourse.base_url) },
site_password: "",
base_url: Discourse.base_url,