Skip to content

Commit

Permalink
Add a StaticPages controller
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkerinanc committed Jun 11, 2012
1 parent 342a812 commit e51b3d8
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Ruby on Rails Tutorial: sample application

This is the sample application for
[*Ruby on Rails Tutorial: Learn Rails by Example*](http://railstutorial.org/) by [Michael Hartl](http://michaelhartl.com/).
Binary file modified app/.DS_Store
Binary file not shown.
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/
8 changes: 8 additions & 0 deletions app/controllers/static_pages_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

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
Binary file added app/views/.DS_Store
Binary file not shown.
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 @@
SampleApp::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

0 comments on commit e51b3d8

Please sign in to comment.