Skip to content

Commit 8921339

Browse files
committed
feature/Add missing page titles
1 parent aa9ffa9 commit 8921339

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

app/controllers/snippets_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ class SnippetsController < ApplicationController
66
UNFILE_CONFIRM_TEXT = "Are you sure you want to unfile this snippet? It will be removed from your collection.".freeze
77

88
def index
9+
@page_title = "Snippets"
910
@user = User.find_by(id: params[:user_id]) || current_user
1011
@display_popover = true
1112
@snippets = @user.filed_snippets.includes(:user)
@@ -138,6 +139,7 @@ def current_folder
138139
end
139140

140141
def show
142+
@page_title = "Snippet"
141143
@snippet = Snippet.includes(comments: :user).find_by(id: params[:id])
142144

143145
unless @snippet

app/controllers/users_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ def edit_avatar_modal
55

66
def show
77
@user = User.find_by(id: params[:id])
8+
@page_title = "#{@user.name}"
89
@serialized_user = @user.serialize.to_json
910
@is_following = current_user ? current_user.following?(@user) : false
1011
@followers = @user.followers

0 commit comments

Comments
 (0)