Commit b6577f34 by Nguyen Hoang Mai Phuong

Merge master

parents bf1a721a c35e7614
Pipeline #1256 canceled with stages
in 0 seconds
module ApplicationHelper module ApplicationHelper
def full_title(page_title) # Returns the full title on a per-page basis.
def full_title(page_title = '')
base_title = "Ruby on Rails Tutorial Sample App" base_title = "Ruby on Rails Tutorial Sample App"
if page_title.empty? if page_title.empty?
base_title base_title
else else
"#{base_title} | #{page_title}" page_title + " | " + base_title
end end
end end
end end
...@@ -4,9 +4,6 @@ ...@@ -4,9 +4,6 @@
<meta charset="utf-8"> <meta charset="utf-8">
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<%= csp_meta_tag %> <%= csp_meta_tag %>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css"
rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<%= stylesheet_link_tag 'application', media: 'all', <%= stylesheet_link_tag 'application', media: 'all',
'data-turbolinks-track': 'reload' %> 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
......
...@@ -10,21 +10,21 @@ class StaticPagesControllerTest < ActionDispatch::IntegrationTest ...@@ -10,21 +10,21 @@ class StaticPagesControllerTest < ActionDispatch::IntegrationTest
get root_path get root_path
get static_pages_home_url get static_pages_home_url
assert_response :success assert_response :success
assert_select "title", "Home | #{@base_title}" assert_select "title", "Ruby on Rails Tutorial Sample App"
end end
test "should get help" do test "should get help" do
get help_path get help_path
get static_pages_help_url get static_pages_help_url
assert_response :success assert_response :success
assert_select "title", "Help | #{@base_title}" assert_select "title", "Ruby on Rails Tutorial Sample App"
end end
test "should get about" do test "should get about" do
get about_path get about_path
get static_pages_about_url get static_pages_about_url
assert_response :success assert_response :success
assert_select "title", "About | #{@base_title}" assert_select "title", "Ruby on Rails Tutorial Sample App"
end end
test "should get contact" do test "should get contact" do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment