Skip to content

Commit 2beea31

Browse files
committed
Add a StaticPages controller
1 parent 775d7ba commit 2beea31

File tree

7 files changed

+21
-0
lines changed

7 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Place all the behaviors and hooks related to the matching controller here.
2+
# All this logic will automatically be available in application.js.
3+
# You can use CoffeeScript in this file: http://coffeescript.org/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Place all the styles related to the StaticPages controller here.
2+
// They will automatically be included in application.css.
3+
// You can use Sass (SCSS) here: http://sass-lang.com/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class StaticPagesController < ApplicationController
2+
def home
3+
end
4+
5+
def help
6+
end
7+
end

app/helpers/static_pages_helper.rb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module StaticPagesHelper
2+
end

app/views/static_pages/help.html.erb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h1>StaticPages#help</h1>
2+
<p>Find me in app/views/static_pages/help.html.erb</p>

app/views/static_pages/home.html.erb

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<h1>StaticPages#home</h1>
2+
<p>Find me in app/views/static_pages/home.html.erb</p>

config/routes.rb

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
SampleApp::Application.routes.draw do
2+
get "static_pages/home"
3+
get "static_pages/help"
24
# The priority is based upon order of creation: first created -> highest priority.
35
# See how all your routes lay out with "rake routes".
46

0 commit comments

Comments
 (0)