Fix document title when viewing other users' favorites

This commit is contained in:
Toks
2013-07-14 19:44:35 -04:00
parent 7b5669ab60
commit 03aee0f664
2 changed files with 2 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ class FavoritesController < ApplicationController
redirect_to(posts_path(:tags => params[:tags])) redirect_to(posts_path(:tags => params[:tags]))
else else
user_id = params[:user_id] || CurrentUser.user.id user_id = params[:user_id] || CurrentUser.user.id
@user = User.find(user_id)
@favorite_set = PostSets::Favorite.new(user_id, params[:page], params) @favorite_set = PostSets::Favorite.new(user_id, params[:page], params)
respond_with(@favorite_set.posts) do |format| respond_with(@favorite_set.posts) do |format|
format.xml do format.xml do

View File

@@ -25,7 +25,7 @@
</section> </section>
<% content_for(:page_title) do %> <% content_for(:page_title) do %>
Favorites - <%= CurrentUser.name %> - <%= Danbooru.config.app_name %> Favorites - <%= @user.pretty_name %> - <%= Danbooru.config.app_name %>
<% end %> <% end %>
<%= render "posts/partials/common/secondary_links" %> <%= render "posts/partials/common/secondary_links" %>