diff --git a/app/services/group_message.rb b/app/services/group_message.rb index 308b09b68..35b9bf5c1 100644 --- a/app/services/group_message.rb +++ b/app/services/group_message.rb @@ -47,7 +47,7 @@ class GroupMessage if @opts[:user] h.merge!({ username: @opts[:user].username, - user_url: userpage_path(@opts[:user].username) + user_url: user_path(@opts[:user].username) }) end h diff --git a/app/views/list/list.rss.erb b/app/views/list/list.rss.erb index fe1a48d43..16c864b36 100644 --- a/app/views/list/list.rss.erb +++ b/app/views/list/list.rss.erb @@ -17,7 +17,7 @@ <author><%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if topic.user.name.present?})" -%></author> <category><%= topic.category.name %></category> <description><![CDATA[ - <p><%= t('author_wrote', author: link_to(topic.user.name, userpage_url(topic.user.username_lower))).html_safe %></p> + <p><%= t('author_wrote', author: link_to(topic.user.name, user_url(topic.user.username_lower))).html_safe %></p> <blockquote> <%= topic.posts.first.cooked.html_safe %> </blockquote> diff --git a/app/views/topics/show.rss.erb b/app/views/topics/show.rss.erb index a20275d0b..634645d8a 100644 --- a/app/views/topics/show.rss.erb +++ b/app/views/topics/show.rss.erb @@ -18,7 +18,7 @@ <author><%= "no-reply@example.com (@#{post.user.username}#{" #{post.user.name}" if post.user.name.present?})" -%></author> <description><![CDATA[ <% post_url = Discourse.base_url + post.url %> - <p><%= t('author_wrote', author: link_to(post.user.name, userpage_url(post.user.username_lower))).html_safe %></p> + <p><%= t('author_wrote', author: link_to(post.user.name, user_url(post.user.username_lower))).html_safe %></p> <blockquote> <% if post.hidden %> <%= t('flagging.user_must_edit').html_safe %> diff --git a/config/routes.rb b/config/routes.rb index 3d0d8a00e..880c561fe 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -189,7 +189,7 @@ Discourse::Application.routes.draw do get "user_preferences" => "users#user_preferences_redirect" get "users/:username/private-messages" => "user_actions#private_messages", constraints: {username: USERNAME_ROUTE_FORMAT} get "users/:username/private-messages/:filter" => "user_actions#private_messages", constraints: {username: USERNAME_ROUTE_FORMAT} - get "users/:username" => "users#show", as: 'userpage', constraints: {username: USERNAME_ROUTE_FORMAT} + get "users/:username" => "users#show", as: 'user', constraints: {username: USERNAME_ROUTE_FORMAT} put "users/:username" => "users#update", constraints: {username: USERNAME_ROUTE_FORMAT} get "users/:username/preferences" => "users#preferences", constraints: {username: USERNAME_ROUTE_FORMAT}, as: :email_preferences get "users/:username/preferences/email" => "users#preferences", constraints: {username: USERNAME_ROUTE_FORMAT}