Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sample_app
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nguyen Hoang Mai Phuong
sample_app
Commits
b6577f34
Commit
b6577f34
authored
Jun 09, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Plain Diff
Merge master
parents
bf1a721a
c35e7614
Pipeline
#1256
canceled with stages
in 0 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
8 deletions
+7
-8
app/helpers/application_helper.rb
+4
-2
app/views/layouts/application.html.erb
+0
-3
test/controllers/static_pages_controller_test.rb
+3
-3
No files found.
app/helpers/application_helper.rb
View file @
b6577f34
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"
if
page_title
.
empty?
base_title
else
"
#{
base_title
}
|
#{
page_title
}
"
page_title
+
" | "
+
base_title
end
end
end
app/views/layouts/application.html.erb
View file @
b6577f34
...
...
@@ -4,9 +4,6 @@
<meta
charset=
"utf-8"
>
<%=
csrf_meta_tags
%>
<%=
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'
,
'data-turbolinks-track'
:
'reload'
%>
<%=
javascript_pack_tag
'application'
,
'data-turbolinks-track'
:
'reload'
%>
...
...
test/controllers/static_pages_controller_test.rb
View file @
b6577f34
...
...
@@ -10,21 +10,21 @@ class StaticPagesControllerTest < ActionDispatch::IntegrationTest
get
root_path
get
static_pages_home_url
assert_response
:success
assert_select
"title"
,
"
Home |
#{
@base_title
}
"
assert_select
"title"
,
"
Ruby on Rails Tutorial Sample App
"
end
test
"should get help"
do
get
help_path
get
static_pages_help_url
assert_response
:success
assert_select
"title"
,
"
Help |
#{
@base_title
}
"
assert_select
"title"
,
"
Ruby on Rails Tutorial Sample App
"
end
test
"should get about"
do
get
about_path
get
static_pages_about_url
assert_response
:success
assert_select
"title"
,
"
About |
#{
@base_title
}
"
assert_select
"title"
,
"
Ruby on Rails Tutorial Sample App
"
end
test
"should get contact"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment