Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

personalized some stuff

  • Loading branch information...
commit bec1d13332cbca95040bb9d2bb4c7cf33592bf1c 1 parent a20e207
@turbulents authored
View
4 app/controllers/pages_controller.rb
@@ -14,4 +14,8 @@ def about
def help
@title = 'Help'
end
+
+ def news
+ @title = 'News'
+ end
end
View
2  app/helpers/application_helper.rb
@@ -2,7 +2,7 @@ module ApplicationHelper
# Return a title on a per-page basis.
def title
- base_title = "Ruby on Rails Tutorial Sample App"
+ base_title = "it is a mystery"
if @title.nil?
base_title
else "#{base_title} | #{@title}"
View
4 app/views/layouts/_footer.html.erb
@@ -3,8 +3,8 @@
<ul>
<li><%= link_to "About", about_path %></li>
<li><%= link_to "Contact", contact_path %></li>
- <li><a href="http://news.railstutorial.org/">News</a></li>
- <li><a href="http://www.railstutorial.org/">Rails Tutorial</a></li>
+ <li><%= link_to "News", news_path %></li>
+ <li><a href="http://www.ycombinator.com/">Y Combinator</a></li>
</ul>
</nav>
</footer>
View
6 app/views/pages/about.html.erb
@@ -1,2 +1,6 @@
<h1>About</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>
+<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae velit odio. Phasellus tincidunt, diam ut pulvinar dignissim, nunc purus sodales ante, nec pretium leo metus ac elit. Donec a iaculis augue. Etiam semper bibendum euismod. Nunc mattis porttitor ante eget hendrerit. Vestibulum magna risus, tristique nec lobortis vel, mollis ac diam. Aenean sagittis ipsum sit amet lorem scelerisque fermentum semper leo sagittis. Vestibulum turpis libero, hendrerit nec molestie eget, rutrum et elit. Aenean ante velit, euismod sit amet vulputate in, dignissim at purus.</p>
+
+<p>Integer lorem lorem, gravida sed facilisis sit amet, luctus quis velit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Curabitur tellus sem, porta in dapibus vitae, aliquam molestie tellus. Fusce lobortis ante nec urna volutpat sed pulvinar eros tincidunt. Vestibulum venenatis urna id arcu suscipit pharetra. Aenean eu nunc quis leo tempor vehicula. Aliquam adipiscing aliquam quam, non euismod lectus tristique ac. Aenean mollis nisl id felis congue rhoncus.</p>
+
+<p>Mauris luctus laoreet diam id congue. Donec nunc ipsum, egestas ut imperdiet in, malesuada ut ipsum. Suspendisse vehicula eros et nibh feugiat imperdiet. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur dignissim nisi eu leo aliquet sit amet aliquet tellus placerat. Suspendisse potenti. Etiam tincidunt interdum lacus non sagittis. Phasellus eget tempor mi. Quisque non enim id ligula accumsan lobortis quis quis purus. Vivamus eget vestibulum neque. Vestibulum eu arcu turpis, et suscipit purus. Sed ullamcorper pellentesque consequat. Quisque facilisis nulla quis mauris commodo vel facilisis justo posuere. Vestibulum pharetra quam eget magna condimentum quis aliquam justo vestibulum. Nullam sollicitudin, orci vel suscipit scelerisque, lorem nunc venenatis ipsum, vel varius massa turpis euismod nisi.</p>
View
2  app/views/pages/contact.html.erb
@@ -1,2 +1,2 @@
<h1>Contact</h1>
-<p>Contact Ruby on Rails Tutorial about the sample app at the <a href="http://railstutorial.org/feedback">feedback page</a>.</p>
+<p>You're on your own.</p>
View
2  app/views/pages/help.html.erb
@@ -1,2 +1,2 @@
<h1>Help</h1>
-<p>Get help on Ruby on Rails Tutorial at the <a href="http://railstutorial.org/help">Rails Tutorial help page</a>. To get help on this sample app, see the <a href="http://railstutorial.org/book">Rails Tutorial book</a>.</p>
+<p><a href="http://www.youtube.com/watch?v=TU7JjJJZi1Q">Get help</a>.</p>
View
4 app/views/pages/home.html.erb
@@ -1,3 +1,3 @@
-<h1>Sample App</h1>
-<p>This is the home page for the <a href="http://railstutorial.org/">Ruby on Rails Tutorial</a> sample application.</p>
+<h1>Home Page</h1>
+<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ac lectus non sapien condimentum imperdiet vel et lacus. Vivamus in.</p>
<%= link_to "Sign up now!", signup_path, :class => "signup_button round" %>
View
2  app/views/pages/news.html.erb
@@ -0,0 +1,2 @@
+<h1>News</h1>
+<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vitae velit odio. Phasellus tincidunt, diam ut pulvinar dignissim, nunc purus sodales ante, nec pretium leo metus ac elit. Donec a iaculis augue. Etiam semper bibendum euismod. Nunc mattis porttitor ante eget hendrerit. Vestibulum magna risus, tristique nec lobortis vel, mollis ac diam. Aenean sagittis ipsum sit amet lorem scelerisque fermentum semper leo sagittis. Vestibulum turpis libero, hendrerit nec molestie eget, rutrum et elit. Aenean ante velit, euismod sit amet vulputate in, dignissim at purus.</p>
View
2  app/views/sessions/new.html.erb
@@ -7,7 +7,7 @@
</div>
<div class="field">
<%= f.label :password %><br />
- <%= f.text_field :password %>
+ <%= f.password_field :password %>
</div>
<div class="actions">
<%= f.submit "Sign in" %>
View
4 app/views/users/new.html.erb
@@ -12,11 +12,11 @@
</div>
<div class="field">
<%= f.label :password %><br />
- <%= f.text_field :password %>
+ <%= f.password_field :password %>
</div>
<div class="field">
<%= f.label :password_confirmation, "Confirmation" %><br />
- <%= f.text_field :password_confirmation %>
+ <%= f.password_field :password_confirmation %>
</div>
<div class="actions">
<%= f.submit "Sign up" %>
View
1  config/routes.rb
@@ -10,6 +10,7 @@
match '/contact', :to => 'pages#contact'
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
+ match '/news', :to => 'pages#news'
root :to => 'pages#home'
get "pages/home"
get "pages/contact"
View
17 spec/controllers/pages_controller_spec.rb
@@ -10,7 +10,7 @@
end
it "should have the right title" do
get 'home'
- response.should have_selector("title", :content => "Ruby on Rails Tutorial Sample App | Home")
+ response.should have_selector("title", :content => "it is a mystery | Home")
end
end
@@ -21,7 +21,7 @@
end
it "should have the right title" do
get 'contact'
- response.should have_selector("title", :content => "Ruby on Rails Tutorial Sample App | Contact")
+ response.should have_selector("title", :content => "it is a mystery | Contact")
end
end
@@ -32,7 +32,18 @@
end
it "should have the right title" do
get 'about'
- response.should have_selector("title", :content => "Ruby on Rails Tutorial Sample App | About")
+ response.should have_selector("title", :content => "it is a mystery | About")
+ end
+ end
+
+ describe "GET 'news'" do
+ it "should be successful" do
+ get 'news'
+ response.should be_success
+ end
+ it "should have the right title" do
+ get 'news'
+ response.should have_selector("title", :content => "it is a mystery | News")
end
end
end
View
42 webrat.log
@@ -119,3 +119,45 @@ REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email
REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
REQUESTING PAGE: GET /signout with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
REQUESTING PAGE: GET http://www.example.com/ with {} and HTTP headers {"HTTP_REFERER"=>"/signout"}
+REQUESTING PAGE: GET / with {} and HTTP headers {}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"spencer.williams@gmail.com", "password"=>"foobar"}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
+REQUESTING PAGE: GET / with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"spencer.williams@gmail.com", "password"=>"foobar"}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
+REQUESTING PAGE: GET / with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
+REQUESTING PAGE: GET /signup with {} and HTTP headers {}
+REQUESTING PAGE: POST /users with {"utf8"=>"\xE2\x9C\x93", "user"=>{"name"=>"", "email"=>"", "password"=>"", "password_confirmation"=>""}, "commit"=>"Sign up"} and HTTP headers {"HTTP_REFERER"=>"/signup"}
+REQUESTING PAGE: GET /signup with {} and HTTP headers {}
+REQUESTING PAGE: POST /users with {"utf8"=>"\xE2\x9C\x93", "user"=>{"name"=>"Example User", "email"=>"user@example.com", "password"=>"foobar", "password_confirmation"=>"foobar"}, "commit"=>"Sign up"} and HTTP headers {"HTTP_REFERER"=>"/signup"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/users"}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"", "password"=>""}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"spencer.williams@gmail.com", "password"=>"foobar"}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
+REQUESTING PAGE: GET /signout with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
+REQUESTING PAGE: GET http://www.example.com/ with {} and HTTP headers {"HTTP_REFERER"=>"/signout"}
+REQUESTING PAGE: GET / with {} and HTTP headers {}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"spencer.williams@gmail.com", "password"=>"foobar"}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
+REQUESTING PAGE: GET / with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"spencer.williams@gmail.com", "password"=>"foobar"}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
+REQUESTING PAGE: GET / with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
+REQUESTING PAGE: GET /signup with {} and HTTP headers {}
+REQUESTING PAGE: POST /users with {"utf8"=>"\xE2\x9C\x93", "user"=>{"name"=>"", "email"=>"", "password"=>"", "password_confirmation"=>""}, "commit"=>"Sign up"} and HTTP headers {"HTTP_REFERER"=>"/signup"}
+REQUESTING PAGE: GET /signup with {} and HTTP headers {}
+REQUESTING PAGE: POST /users with {"utf8"=>"\xE2\x9C\x93", "user"=>{"name"=>"Example User", "email"=>"user@example.com", "password"=>"foobar", "password_confirmation"=>"foobar"}, "commit"=>"Sign up"} and HTTP headers {"HTTP_REFERER"=>"/signup"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/users"}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"", "password"=>""}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET /signin with {} and HTTP headers {}
+REQUESTING PAGE: POST /sessions with {"utf8"=>"\xE2\x9C\x93", "session"=>{"email"=>"spencer.williams@gmail.com", "password"=>"foobar"}, "commit"=>"Sign in"} and HTTP headers {"HTTP_REFERER"=>"/signin"}
+REQUESTING PAGE: GET http://www.example.com/users/1 with {} and HTTP headers {"HTTP_REFERER"=>"/sessions"}
+REQUESTING PAGE: GET /signout with {} and HTTP headers {"HTTP_REFERER"=>"http://www.example.com/users/1"}
+REQUESTING PAGE: GET http://www.example.com/ with {} and HTTP headers {"HTTP_REFERER"=>"/signout"}
Please sign in to comment.
Something went wrong with that request. Please try again.