Skip to content

Commit

Permalink
Merge pull request #7004 from fjordllc/feature/add-practice-to-title-…
Browse files Browse the repository at this point in the history
…tag-on-practice-page

プラクティスページのtitleタグに表示される文字列の先頭に「プラクティス 」の文言を追加
  • Loading branch information
komagata authored Nov 7, 2023
2 parents eaebd68 + 58b5173 commit 3376542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/views/practices/show.html.slim
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
- title @practice.title
- title "プラクティス #{@practice.title}"
- set_meta_tags description: "プラクティス「#{@practice.title}」のページです。"
- category = @practice.category(current_user.course)

= render '/shared/modal_learning_completion', practice: @practice, tweet_url: @tweet_url, should_display_message_automatically: false
= render '/practices/page_header', title: title, category: category
= render '/practices/page_header', title: @practice.title, category: category
= render 'page_tabs', resource: @practice

.page-body
Expand Down
4 changes: 2 additions & 2 deletions test/system/practices_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class PracticesTest < ApplicationSystemTestCase
test 'show practice' do
visit_with_auth "/practices/#{practices(:practice1).id}", 'hatsuno'
assert_equal 'OS X Mountain Lionをクリーンインストールする | FBC', title
assert_equal 'プラクティス OS X Mountain Lionをクリーンインストールする | FBC', title
end

test 'show link to all practices with same category' do
Expand Down Expand Up @@ -196,7 +196,7 @@ def wait_for_status_change
end
assert_text 'プラクティスを更新しました'
visit "/practices/#{practice.id}"
assert_equal 'テストプラクティス | FBC', title
assert_equal 'プラクティス テストプラクティス | FBC', title
end

test 'show last updated user icon' do
Expand Down

0 comments on commit 3376542

Please sign in to comment.