Skip to content

Commit

Permalink
David's page
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcockerham committed May 15, 2013
1 parent 3389bb5 commit 6c7d6c1
Show file tree
Hide file tree
Showing 20 changed files with 480 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
source 'https://rubygems.org'

gem 'rails', '3.2.12'

gem 'jquery-rails'
gem 'devise'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
bcrypt-ruby (3.0.1)
bootstrap-sass (2.3.1.0)
sass (~> 3.2)
builder (3.0.4)
Expand All @@ -39,6 +40,11 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.6.2)
devise (2.2.4)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.1)
railties (~> 3.1)
warden (~> 1.2.1)
erubis (2.7.0)
execjs (1.4.0)
multi_json (~> 1.0)
Expand All @@ -55,6 +61,7 @@ GEM
treetop (~> 1.4.8)
mime-types (1.23)
multi_json (1.7.2)
orm_adapter (0.4.0)
pg (0.15.1)
polyglot (0.3.3)
rack (1.4.5)
Expand Down Expand Up @@ -102,13 +109,16 @@ GEM
uglifier (2.0.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
warden (1.2.1)
rack (>= 1.0)

PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass (~> 2.3.1.0)
coffee-rails (~> 3.2.1)
devise
jquery-rails
pg
rails (= 3.2.12)
Expand Down
9 changes: 8 additions & 1 deletion app/controllers/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ class PagesController < ApplicationController
def home
end

def action
def about
end

def bryan
end

def dad
end

def david
@data = params[:David_answer]
end

def answer
end
end
11 changes: 11 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable,
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable

# Setup accessible (or protected) attributes for your model
attr_accessible :email, :password, :password_confirmation, :remember_me
# attr_accessible :title, :body
end
7 changes: 4 additions & 3 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
<div class="nav-collapse collapse">
<ul class='nav'>
<li><%= link_to "Home", root_path %></li>
<li><%= link_to "About", about_path %></li>
<li><%= link_to "Bryan", bryan_path %></li>
<li><%= link_to "Dad", dad_path %></li>
<li><%= link_to "David", david_path %></li>
<li><%= link_to "About", about_path %></li>
<li><%= link_to "Bryan", bryan_path %></li>
<li><%= link_to "Dad", dad_path %></li>
<!-- .nav, .navbar-search, .navbar-form, etc -->
</ul>
<ul class='nav pull-right'>
Expand Down
4 changes: 4 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@
</head>
<body>
<%= render 'layouts/header' %>

<div class="container">
<% flash.each do |name, msg| %>
<%= content_tag(:div, msg, class: "asert alert-#{name}") %>
<% end %>
<%= yield %>
<%= render 'layouts/footer' %>
</div>
Expand Down
3 changes: 3 additions & 0 deletions app/views/pages/answer.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<p>
<%= @data %>
</p>
14 changes: 14 additions & 0 deletions app/views/pages/david.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<h1>Hey David Clayton! Welcome to your page!</h1>
<p> Congratulations on finding your page man. How are things? How was the hangout last night?

I'm still curious what was the thing that tipped your decision to choose Stanford.
</p>
<!--
(if you want :)
<br>
</p>
<form>
<input type="text" name="David_answer" style="width: 600px; height: 400px;"/>
</form>
<input type="submit">
-->
2 changes: 1 addition & 1 deletion app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Store all of your learning and work experiences in one place.
</p>
<p>
<%= link_to "Create your SkillChest!", "#", class: "btn btn-primary btn-large" %>
<%= link_to "Create your SkillChest!", new_user_registration_path, class: "btn btn-primary btn-large" %>
</p>
</div>
</div>
Expand Down
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ class Application < Rails::Application

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'

# Required for devise on heroku
config.assets.initialize_on_precompile = false
end
end
3 changes: 3 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@

# Expands the lines which load the assets
config.assets.debug = true

# From Devise gem
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
end
3 changes: 3 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,7 @@
# Log the query plan for queries taking more than this (works
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5

# For Devise gem. In production, :host should be set to the actual host of your application.
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
end
Loading

0 comments on commit 6c7d6c1

Please sign in to comment.