Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0218c0
commit b562423
Showing
15 changed files
with
115 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
require 'autotest/growl' | |||
require 'autotest/fsevent' | |||
require 'redgreen/autotest' | |||
require "autotest/restart" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1,3 @@ | |||
--colour | --colour | ||
--drb | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,8 +1,14 @@ | |||
class PagesController < ApplicationController | class PagesController < ApplicationController | ||
def home | def home | ||
@title = "Home" | |||
end | end | ||
|
|
||
def contact | def contact | ||
@title = "Contact" | |||
end | |||
|
|||
def about | |||
@title = "About" | |||
end | end | ||
|
|
||
end | end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,14 +1,10 @@ | |||
<!DOCTYPE html> | <!DOCTYPE html> | ||
<html> | <html> | ||
<head> | <head> | ||
<title>SampleApp</title> | <title>Ruby on Rails Tutorial Sample App | <%= @title %></title> | ||
<%= stylesheet_link_tag :all %> | <%= csrf_meta_tag %> | ||
<%= javascript_include_tag :defaults %> | </head> | ||
<%= csrf_meta_tag %> | <body> | ||
</head> | <%= yield %> | ||
<body> | </body> | ||
|
|||
<%= yield %> | |||
|
|||
</body> | |||
</html> | </html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
<h1>About Us</h1> | |||
<p> | |||
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a> | |||
is a project to make a book and screencasts to teach web development | |||
with <a href="http://rubyonrails.org/">Ruby on Rails</a>. This | |||
is the sample application for the tutorial. | |||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,5 @@ | |||
<h1>Pages#contact</h1> | <h1>Contact</h1> | ||
<p>Find me in app/views/pages/contact.html.erb</p> | <p> | ||
Contact Ruby on Rails Tutorial about the sample app at the | |||
<a href="http://railstutorial.org/feedback">feedback page</a>. | |||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,6 @@ | |||
<h1>Pages#home</h1> | <h1>Sample App</h1> | ||
<p>Find me in app/views/pages/home.html.erb</p> | <p> | ||
This is the home page for the | |||
<a href="http://railstutorial.org/">Ruby on Rails Tutorial</a> | |||
sample application. | |||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,19 +1,46 @@ | |||
require 'spec_helper' | require 'spec_helper' | ||
|
|
||
describe PagesController do | describe PagesController do | ||
render_views | |||
|
|
||
describe "GET 'home'" do | describe "GET 'home'" do | ||
it "should be successful" do | it "should be successful" do | ||
get 'home' | get 'home' | ||
response.should be_success | response.should be_success | ||
end | end | ||
|
|||
it "should have the right title" do | |||
get 'home' | |||
response.should have_selector("title", | |||
:content => "Ruby on Rails Tutorial Sample App | Home") | |||
end | |||
end | end | ||
|
|
||
describe "GET 'contact'" do | describe "GET 'contact'" do | ||
it "should be successful" do | it "should be successful" do | ||
get 'contact' | get 'contact' | ||
response.should be_success | response.should be_success | ||
end | end | ||
|
|||
it "should have the right title" do | |||
get 'contact' | |||
response.should have_selector("title", | |||
:content => | |||
"Ruby on Rails Tutorial Sample App | Contact") | |||
end | |||
end | end | ||
|
|
||
describe "GET 'about'" do | |||
it "should be successful" do | |||
get 'about' | |||
response.should be_success | |||
end | |||
|
|||
it "should have the right title" do | |||
get 'about' | |||
response.should have_selector("title", | |||
:content => | |||
"Ruby on Rails Tutorial Sample App | About") | |||
end | |||
end | |||
end | end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.