Skip to content

Commit

Permalink
Continuing tutorials.
Browse files Browse the repository at this point in the history
  • Loading branch information
dep committed Dec 26, 2011
1 parent 9f26730 commit d4d2df3
Show file tree
Hide file tree
Showing 15 changed files with 421 additions and 245 deletions.
6 changes: 6 additions & 0 deletions .autotest
@@ -1,2 +1,8 @@
require 'autotest/growl'
require 'autotest/fsevent'

Autotest.add_hook :initialize do |autotest|
autotest.add_mapping(/^spec\/requests\/.*_spec\.rb$/) do
autotest.files_matching(/^spec\/requests\/.*_spec\.rb$/)
end
end
2 changes: 2 additions & 0 deletions app/assets/javascripts/users.js
@@ -0,0 +1,2 @@
// Place all the behaviors and hooks related to the matching controller here.
// All this logic will automatically be available in application.js.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/users.css
@@ -0,0 +1,4 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
*/
6 changes: 6 additions & 0 deletions app/controllers/users_controller.rb
@@ -0,0 +1,6 @@
class UsersController < ApplicationController
def new
@title = "Sign up"
end

end
11 changes: 11 additions & 0 deletions app/helpers/application_helper.rb
@@ -1,2 +1,13 @@
module ApplicationHelper

# Return a title on a per-page basis.
def title
base_title = "Ruby on Rails Tutorial Sample App"
if @title.nil?
base_title
else
"#{base_title} | #{@title}"
end
end

end
2 changes: 2 additions & 0 deletions app/helpers/users_helper.rb
@@ -0,0 +1,2 @@
module UsersHelper
end
6 changes: 4 additions & 2 deletions app/views/layouts/application.html.erb
@@ -1,10 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<title>Ruby on Rails Tutorial Sample App | <%= @title %></title>
<title><%= title %></title>
<%= csrf_meta_tag %>
<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
<%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
</head>
<body>
<%= yield %>
</body>
</html>
</html>
2 changes: 2 additions & 0 deletions app/views/users/new.html.erb
@@ -0,0 +1,2 @@
<h1>Users#new</h1>
<p>Find me in app/views/users/new.html.erb</p>
12 changes: 8 additions & 4 deletions config/routes.rb
@@ -1,9 +1,13 @@
SampleApp::Application.routes.draw do
get "pages/home"
get "pages/contact"
get "pages/about"
get "pages/help"
get "users/new"

match "/signup", :to => "users#new"

match "/contact", :to => 'pages#contact'
match "/about", :to => 'pages#about'
match "/help", :to => 'pages#help'

root :to => 'pages#home'
# The priority is based upon order of creation:
# first created -> highest priority.

Expand Down
239 changes: 0 additions & 239 deletions public/index.html

This file was deleted.

36 changes: 36 additions & 0 deletions public/stylesheets/ie.css
@@ -0,0 +1,36 @@
/* -----------------------------------------------------------------------
Blueprint CSS Framework 1.0.1
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */

/* ie.css */
body {text-align:center;}
.container {text-align:left;}
* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;}
* html legend {margin:0px -8px 16px 0;padding:0;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
html>body p code {*white-space:normal;}
hr {margin:-8px auto 11px;}
img {-ms-interpolation-mode:bicubic;}
.clearfix, .container {display:inline-block;}
* html .clearfix, * html .container {height:1%;}
fieldset {padding-top:0;}
legend {margin-top:-0.2em;margin-bottom:1em;margin-left:-0.5em;}
textarea {overflow:auto;}
label {vertical-align:middle;position:relative;top:-0.25em;}
input.text, input.title, textarea {background-color:#fff;border:1px solid #bbb;}
input.text:focus, input.title:focus {border-color:#666;}
input.text, input.title, textarea, select {margin:0.5em 0;}
input.checkbox, input.radio {position:relative;top:.25em;}
form.inline div, form.inline p {vertical-align:middle;}
form.inline input.checkbox, form.inline input.radio, form.inline input.button, form.inline button {margin:0.5em 0;}
button, input.button {position:relative;top:0.25em;}
29 changes: 29 additions & 0 deletions public/stylesheets/print.css
@@ -0,0 +1,29 @@
/* -----------------------------------------------------------------------
Blueprint CSS Framework 1.0.1
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
----------------------------------------------------------------------- */

/* print.css */
body {line-height:1.5;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;color:#000;background:none;font-size:10pt;}
.container {background:none;}
hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
hr.space {background:#fff;color:#fff;visibility:hidden;}
h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
code {font:.9em "Courier New", Monaco, Courier, monospace;}
a img {border:none;}
p img.top {margin-top:0;}
blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
.small {font-size:.9em;}
.large {font-size:1.1em;}
.quiet {color:#999;}
.hide {display:none;}
a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
a:link:after, a:visited:after {content:" (" attr(href) ")";font-size:90%;}

0 comments on commit d4d2df3

Please sign in to comment.