Skip to content

Commit

Permalink
Add static pages controller
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarnhart committed Jan 24, 2012
1 parent 914a79c commit de6f5de
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/static_pages.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/static_pages.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the StaticPages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
7 changes: 7 additions & 0 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class StaticPagesController < ApplicationController
def home
end

def help
end
end
2 changes: 2 additions & 0 deletions app/helpers/static_pages_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module StaticPagesHelper
end
2 changes: 2 additions & 0 deletions app/views/static_pages/help.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>StaticPages#help</h1>
<p>Find me in app/views/static_pages/help.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/static_pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>StaticPages#home</h1>
<p>Find me in app/views/static_pages/home.html.erb</p>
4 changes: 4 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
RailsTest::Application.routes.draw do
get "static_pages/home"

get "static_pages/help"

# The priority is based upon order of creation:
# first created -> highest priority.

Expand Down
9 changes: 9 additions & 0 deletions public/hello.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html>
<head>
<title>Greetings From Mars</title>
</head>
<body>
<p>Hello to Earth. This is the Josh. All your internets are strosh to us. Prepare for existential crisis.</p>
</body>
</html>

0 comments on commit de6f5de

Please sign in to comment.