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
a8ce1463
Commit
a8ce1463
authored
Jun 02, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a Static Pages controller
parent
da0c4be1
Pipeline
#1218
failed with stages
in 0 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
20 deletions
+22
-20
app/views/static_pages/help.html.erb
+2
-9
app/views/static_pages/home.html.erb
+2
-6
config/routes.rb
+3
-5
db/schema.rb
+15
-0
No files found.
app/views/static_pages/help.html.erb
View file @
a8ce1463
<h1>
Help
</h1>
<h1>
StaticPages#help
</h1>
<p>
<p>
Find me in app/views/static_pages/help.html.erb
</p>
Get help on the Ruby on Rails Tutorial at the
<a
href=
"https://www.railstutorial.org/help"
>
Rails Tutorial Help page
</a>
.
To get help on this sample app, see the
<a
href=
"https://www.railstutorial.org/book"
><em>
Ruby on Rails Tutorial
</em>
book
</a>
.
</p>
\ No newline at end of file
app/views/static_pages/home.html.erb
View file @
a8ce1463
<h1>
Sample App
</h1>
<h1>
StaticPages#home
</h1>
<p>
<p>
Find me in app/views/static_pages/home.html.erb
</p>
This is the home page for the
<a
href=
"https://www.railstutorial.org/"
>
Ruby on Rails Tutorial
</a>
sample application.
</p>
config/routes.rb
View file @
a8ce1463
Rails
.
application
.
routes
.
draw
do
Rails
.
application
.
routes
.
draw
do
g
#et 'static_pages/home'
get
'static_pages/home'
root
'static_pages#home'
get
'static_pages/help'
get
'/home'
,
to:
'static_pages#home'
root
'application#hello'
get
'/help'
,
to:
'static_pages#help'
#root 'static_pages#home'
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
end
end
db/schema.rb
0 → 100644
View file @
a8ce1463
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
0
)
do
end
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