Actually, it *should* be `user_path` and not `userpage_path`

This commit is contained in:
Robin Ward 2014-06-04 16:51:48 -04:00
parent 66fe80c52a
commit 24cde6c604
4 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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>

View File

@ -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 %>

View File

@ -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}