From de6f5dea0f11de5503d908bdf2483eab3648ca2a Mon Sep 17 00:00:00 2001 From: dbarnhart Date: Tue, 24 Jan 2012 15:24:38 -0500 Subject: [PATCH] Add static pages controller --- app/assets/javascripts/static_pages.js.coffee | 3 +++ app/assets/stylesheets/static_pages.css.scss | 3 +++ app/controllers/static_pages_controller.rb | 7 +++++++ app/helpers/static_pages_helper.rb | 2 ++ app/views/static_pages/help.html.erb | 2 ++ app/views/static_pages/home.html.erb | 2 ++ config/routes.rb | 4 ++++ public/hello.html | 9 +++++++++ 8 files changed, 32 insertions(+) create mode 100644 app/assets/javascripts/static_pages.js.coffee create mode 100644 app/assets/stylesheets/static_pages.css.scss create mode 100644 app/controllers/static_pages_controller.rb create mode 100644 app/helpers/static_pages_helper.rb create mode 100644 app/views/static_pages/help.html.erb create mode 100644 app/views/static_pages/home.html.erb create mode 100644 public/hello.html diff --git a/app/assets/javascripts/static_pages.js.coffee b/app/assets/javascripts/static_pages.js.coffee new file mode 100644 index 0000000..7615679 --- /dev/null +++ b/app/assets/javascripts/static_pages.js.coffee @@ -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/ diff --git a/app/assets/stylesheets/static_pages.css.scss b/app/assets/stylesheets/static_pages.css.scss new file mode 100644 index 0000000..d55836c --- /dev/null +++ b/app/assets/stylesheets/static_pages.css.scss @@ -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/ diff --git a/app/controllers/static_pages_controller.rb b/app/controllers/static_pages_controller.rb new file mode 100644 index 0000000..c76b925 --- /dev/null +++ b/app/controllers/static_pages_controller.rb @@ -0,0 +1,7 @@ +class StaticPagesController < ApplicationController + def home + end + + def help + end +end diff --git a/app/helpers/static_pages_helper.rb b/app/helpers/static_pages_helper.rb new file mode 100644 index 0000000..2d63e79 --- /dev/null +++ b/app/helpers/static_pages_helper.rb @@ -0,0 +1,2 @@ +module StaticPagesHelper +end diff --git a/app/views/static_pages/help.html.erb b/app/views/static_pages/help.html.erb new file mode 100644 index 0000000..61896f5 --- /dev/null +++ b/app/views/static_pages/help.html.erb @@ -0,0 +1,2 @@ +

StaticPages#help

+

Find me in app/views/static_pages/help.html.erb

diff --git a/app/views/static_pages/home.html.erb b/app/views/static_pages/home.html.erb new file mode 100644 index 0000000..af94c7f --- /dev/null +++ b/app/views/static_pages/home.html.erb @@ -0,0 +1,2 @@ +

StaticPages#home

+

Find me in app/views/static_pages/home.html.erb

diff --git a/config/routes.rb b/config/routes.rb index 9c48d24..c5d6fc3 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -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. diff --git a/public/hello.html b/public/hello.html new file mode 100644 index 0000000..9441fcb --- /dev/null +++ b/public/hello.html @@ -0,0 +1,9 @@ + + + + Greetings From Mars + + +

Hello to Earth. This is the Josh. All your internets are strosh to us. Prepare for existential crisis.

+ + \ No newline at end of file