Permalink
Browse files

add pages controller

  • Loading branch information...
1 parent 359eb61 commit 0d6b391638385a0a2d7bc041e3c8e5514a888515 @jacktandrew committed Oct 11, 2011
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
34 Gemfile
@@ -1,31 +1,13 @@
source 'http://rubygems.org'
-gem 'rails', '3.0.9'
-
-# Bundle edge Rails instead:
-# gem 'rails', :git => 'git://github.com/rails/rails.git'
-
+gem 'rails'
gem 'sqlite3'
-# Use unicorn as the web server
-# gem 'unicorn'
-
-# Deploy with Capistrano
-# gem 'capistrano'
-
-# To use debugger (ruby-debug for Ruby 1.8.7+, ruby-debug19 for Ruby 1.9.2+)
-# gem 'ruby-debug'
-# gem 'ruby-debug19', :require => 'ruby-debug'
-
-# Bundle the extra gems:
-# gem 'bj'
-# gem 'nokogiri'
-# gem 'sqlite3-ruby', :require => 'sqlite3'
-# gem 'aws-s3', :require => 'aws/s3'
+group :development do
+ gem 'rspec-rails'
+end
-# Bundle gems for the local environment. Make sure to
-# put test-only gems in this group so their generators
-# and rake tasks are available in development mode:
-# group :development, :test do
-# gem 'webrat'
-# end
+group :test do
+ gem 'rspec-rails'
+ gem 'webrat'
+end
View
@@ -0,0 +1,96 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.9)
+ actionpack (= 3.0.9)
+ mail (~> 2.2.19)
+ actionpack (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.5.0)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.14)
+ rack-test (~> 0.5.7)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.9)
+ activesupport (= 3.0.9)
+ builder (~> 2.1.2)
+ i18n (~> 0.5.0)
+ activerecord (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ arel (~> 2.0.10)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.9)
+ activemodel (= 3.0.9)
+ activesupport (= 3.0.9)
+ activesupport (3.0.9)
+ arel (2.0.10)
+ builder (2.1.2)
+ diff-lcs (1.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
+ mail (2.2.19)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ nokogiri (1.4.6)
+ polyglot (0.3.1)
+ rack (1.2.3)
+ rack-mount (0.6.14)
+ rack (>= 1.0.0)
+ rack-test (0.5.7)
+ rack (>= 1.0)
+ rails (3.0.9)
+ actionmailer (= 3.0.9)
+ actionpack (= 3.0.9)
+ activerecord (= 3.0.9)
+ activeresource (= 3.0.9)
+ activesupport (= 3.0.9)
+ bundler (~> 1.0)
+ railties (= 3.0.9)
+ railties (3.0.9)
+ actionpack (= 3.0.9)
+ activesupport (= 3.0.9)
+ rake (>= 0.8.7)
+ rdoc (~> 3.4)
+ thor (~> 0.14.4)
+ rake (0.9.2)
+ rdoc (3.6.1)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rspec-rails (2.6.1)
+ actionpack (~> 3.0)
+ activesupport (~> 3.0)
+ railties (~> 3.0)
+ rspec (~> 2.6.0)
+ sqlite3 (1.3.3)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.28)
+ webrat (0.7.1)
+ nokogiri (>= 1.2.0)
+ rack (>= 1.0)
+ rack-test (>= 0.5.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rails
+ rspec-rails
+ sqlite3
+ webrat
@@ -0,0 +1,5 @@
+class PagesController < ApplicationController
+ def home
+ end
+
+end
@@ -0,0 +1,2 @@
+module PagesHelper
+end
@@ -13,99 +13,7 @@
<div id="wrapper">
<img src="images/banner.jpg" id="banner" />
- <div id="contact">
- <h1 id="name">David F. Andrew, DDS</h1>
- <h1 id="phone">253-752-2447</h1>
- <h3>2302 S Union Ave</h3>
- <h3>Building B, Suite 12</h3>
- <h3>Tacoma, WA 98405</h3>
- <h4>(Across from Target on Union Ave)</h4>
- </div>
-
- <img src="images/with_asst.jpg" id="with_asst" />
-
- <div id="blurb">
- <img src="images/no_asst.jpg" id="no_asst" />
- <p>David F. Andrew of Tacoma, WA offers gentle dental care for the entire family. Since 1975, we have been giving our patients healthy and lasting smiles. Family owned and operated, our dental clinic welcomes new patients and children every day. Dr. David F Andrew received his degree from the University of Washington. He is also a proud member of the American Dental Association, the Washington State Dental Association, and the Pierce County Dental Association.
- </p>
- </div>
-
- <div id="info">
- <div id="proc">
- <h3>Dental Care Services Include:</h3>
- <ul>
- <li>Preventative Dentistry</li>
- <li>Cleanings</li>
- <li>Fillings</li>
- <li>Natural-Looking Crowns &amp; Bridges</li>
- <li>Cosmetic Dentistry</li>
- <li>Implant Restorative Dentistry</li>
- <li>Oral Surgery</li>
- <li>Root Canals</li>
- <li>Dentures</li>
- </ul>
- </div> <!-- end of about -->
-
- <div id="about">
- <h3>New Patients Welcome</h3>
- <ul>
- <li>Caring, Friendly &amp; Professional</li>
- <li>Soothing Nitrous Oxide</li>
- <li>Most Insurance Plans Accepted</li>
- </ul>
- <img src="images/visa.gif" id="visa" />
- </div>
- </div> <!-- end of info -->
-
- <div id="route_finder">
- <h2>Get directions to the office</h2>
- <br/>
-
- <form action="#" onsubmit="setDirections(this.from.value, this.to.value, this.locale.value); return false">
-
- <table>
- <tr>
- <th align="right">From:&nbsp;</th>
-
- <td>
- <input type="text" size="35" id="fromAddress" name="from"
- onFocus="this.value=''" value="Starting Point"/>
- </td>
-
- <th align="right">&nbsp;&nbsp;To:&nbsp;</th>
-
- <td align="right">
- <input type="text" size="50" id="toAddress" name="to"
- value="David F. Andrew, DDS - 2302 S Union #12 Tacoma, WA" />
- </td>
-
- <td>
- <input name="submit" type="submit" value="Get Directions!" size="45"/>
- </td>
-
- <td class="hidden">Language:&nbsp;</td>
-
- <td class="hidden">
- <select id="locale" name="locale">
-
- <option value="en" selected>English</option>
- <!-- <option value="fr">French</option>
- <option value="de">German</option>
- <option value="ja">Japanese</option>
- <option value="es">Spanish</option> -->
- </select>
- </td>
- </tr>
- </table>
- </form>
- <br/>
- <table class="directions">
- <tr><th>Formatted Directions</th><th>Map</th></tr>
- <tr>
- <td valign="top"><div id="directions" style="width: 275px"></div></td>
- <td valign="top"><div id="map_canvas" style="width: 510px; height: 400px"></div></td>
- </tr>
- </table>
- </div> <!-- end of wrapper -->
+ <%= yield %>
+
</body>
</html>
@@ -0,0 +1,94 @@
+ <div id="contact">
+ <h1 id="name">David F. Andrew, DDS</h1>
+ <h1 id="phone">253-752-2447</h1>
+ <h3>2302 S Union Ave</h3>
+ <h3>Building B, Suite 12</h3>
+ <h3>Tacoma, WA 98405</h3>
+ <h4>(Across from Target on Union Ave)</h4>
+ </div>
+
+ <img src="images/with_asst.jpg" id="with_asst" />
+
+ <div id="blurb">
+ <img src="images/no_asst.jpg" id="no_asst" />
+ <p>David F. Andrew of Tacoma, WA offers gentle dental care for the entire family. Since 1975, we have been giving our patients healthy and lasting smiles. Family owned and operated, our dental clinic welcomes new patients and children every day. Dr. David F Andrew received his degree from the University of Washington. He is also a proud member of the American Dental Association, the Washington State Dental Association, and the Pierce County Dental Association.
+ </p>
+ </div>
+
+ <div id="info">
+ <div id="proc">
+ <h3>Dental Care Services Include:</h3>
+ <ul>
+ <li>Preventative Dentistry</li>
+ <li>Cleanings</li>
+ <li>Fillings</li>
+ <li>Natural-Looking Crowns &amp; Bridges</li>
+ <li>Cosmetic Dentistry</li>
+ <li>Implant Restorative Dentistry</li>
+ <li>Oral Surgery</li>
+ <li>Root Canals</li>
+ <li>Dentures</li>
+ </ul>
+ </div> <!-- end of about -->
+
+ <div id="about">
+ <h3>New Patients Welcome</h3>
+ <ul>
+ <li>Caring, Friendly &amp; Professional</li>
+ <li>Soothing Nitrous Oxide</li>
+ <li>Most Insurance Plans Accepted</li>
+ </ul>
+ <img src="images/visa.gif" id="visa" />
+ </div>
+ </div> <!-- end of info -->
+
+ <div id="route_finder">
+ <h2>Get directions to the office</h2>
+ <br/>
+
+ <form action="#" onsubmit="setDirections(this.from.value, this.to.value, this.locale.value); return false">
+
+ <table>
+ <tr>
+ <th align="right">From:&nbsp;</th>
+
+ <td>
+ <input type="text" size="35" id="fromAddress" name="from"
+ onFocus="this.value=''" value="Starting Point"/>
+ </td>
+
+ <th align="right">&nbsp;&nbsp;To:&nbsp;</th>
+
+ <td align="right">
+ <input type="text" size="50" id="toAddress" name="to"
+ value="David F. Andrew, DDS - 2302 S Union #12 Tacoma, WA" />
+ </td>
+
+ <td>
+ <input name="submit" type="submit" value="Get Directions!" size="45"/>
+ </td>
+
+ <td class="hidden">Language:&nbsp;</td>
+
+ <td class="hidden">
+ <select id="locale" name="locale">
+
+ <option value="en" selected>English</option>
+ <!-- <option value="fr">French</option>
+ <option value="de">German</option>
+ <option value="ja">Japanese</option>
+ <option value="es">Spanish</option> -->
+ </select>
+ </td>
+ </tr>
+ </table>
+ </form>
+ <br/>
+ <table class="directions">
+ <tr><th>Formatted Directions</th><th>Map</th></tr>
+ <tr>
+ <td valign="top"><div id="directions" style="width: 275px"></div></td>
+ <td valign="top"><div id="map_canvas" style="width: 510px; height: 400px"></div></td>
+ </tr>
+ </table>
+</div> <!-- end of wrapper -->
View
@@ -1,4 +1,6 @@
DavidFAndrewDDS::Application.routes.draw do
+ get "pages/home"
+
# The priority is based upon order of creation:
# first created -> highest priority.
@@ -48,7 +50,7 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
- # root :to => "welcome#index"
+ root :to => "pages#home"
# See how all your routes lay out with "rake routes"
@@ -4,7 +4,7 @@ body {
font-family: Verdana, Arial, sans serif;
font-size: 11px;
margin: 2px;
- background: #ffffff url('images/blue2white.jpg') repeat-x;
+ background: #ffffff url('/images/blue2white.jpg') repeat-x;
}
#wrapper {
@@ -0,0 +1,12 @@
+require 'spec_helper'
+
+describe PagesController do
+
+ describe "GET 'home'" do
+ it "should be successful" do
+ get 'home'
+ response.should be_success
+ end
+ end
+
+end
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the PagesHelper. For example:
+#
+# describe PagesHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe PagesHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end
Oops, something went wrong.

0 comments on commit 0d6b391

Please sign in to comment.