Skip to content
This repository has been archived by the owner on Apr 9, 2019. It is now read-only.

Commit

Permalink
Merge branch 'precomp2011' of github.com:leongersing/its-a-website in…
Browse files Browse the repository at this point in the history
…to precomp2011
  • Loading branch information
hkarthik committed Jan 12, 2011
2 parents 6f15ec5 + eef6b9e commit cbec445
Show file tree
Hide file tree
Showing 65 changed files with 135 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README
@@ -1,3 +1,21 @@
Requirements:

STORY FORMAT:
As a <role>
I would like to <action>
So that I may <value>

As a conference attendee
I would like to view a list of presentations
So that I may plan my day at the conf.

As an admin
I would like to provide a list of presentations
So that I may describe the schedule for conference
attendees and staff



I'm leaving the Rails message below for those new to rails.

Hello! this is a boiler-plate branch for the "It's a Website!" precompiler event
Expand Down
20 changes: 20 additions & 0 deletions app/controllers/presentations_controller.rb
@@ -0,0 +1,20 @@
class PresentationsController < ApplicationController
def new
@presentation = Presentation.new
end

def create
@presentation = Presentation.create(params[:presentation])
if(@presentation.save)
flash[:success] = "Presentation '#{@presentation}' created!"
redirect_to presentation_path(@presentation)
else
flash[:error] = "FAIL!<br>#{@presentation.errors.full_messages.join("<br>")}"
render :new
end
end

def show
@presentation = Presentation.find(params[:id])
end
end
2 changes: 2 additions & 0 deletions app/helpers/presentations_helper.rb
@@ -0,0 +1,2 @@
module PresentationsHelper
end
5 changes: 5 additions & 0 deletions app/models/presentation.rb
@@ -0,0 +1,5 @@
class Presentation < ActiveRecord::Base
validates_presence_of :name
validates_presence_of :starts_at
validates_presence_of :speaker_name
end
1 change: 1 addition & 0 deletions app/views/presentations/index.html.erb
@@ -0,0 +1 @@
<%= link_to "all presentations", presentations_path %>
19 changes: 19 additions & 0 deletions app/views/presentations/new.html.erb
@@ -0,0 +1,19 @@
<p><%= flash[:error] if flash[:error] %></p>
<%= form_for(@presentation) do |form| %>
<p>
<%= form.label :name %>
<%= form.text_field :name %>
</p>

<p>
<%= form.label :starts_at %>
<%= form.datetime_select :starts_at %>
</p>
<p>
<%= form.label :speaker_name %>
<%= form.text_field :speaker_name %>
</p>
<p>
<%= form.submit "Create Presentation" %>
</p>
<% end %>
1 change: 1 addition & 0 deletions app/views/presentations/show.html.erb
@@ -0,0 +1 @@
Presentation: <%= @presentation.name %>
22 changes: 22 additions & 0 deletions config/database.example.yml
@@ -0,0 +1,22 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
2 changes: 2 additions & 0 deletions config/routes.rb
@@ -1,3 +1,5 @@
Precomp2011::Application.routes.draw do
resources :presentations

match '/auth/:provider/callback', :to => 'sessions#create'
end
18 changes: 18 additions & 0 deletions db/migrate/20110112150507_create_presentations.rb
@@ -0,0 +1,18 @@
class CreatePresentations < ActiveRecord::Migration
def self.up
create_table :presentations do |t|
t.string :name
t.string :description
t.string :room
t.integer :duration
t.string :speaker_name
t.datetime :starts_at

t.timestamps
end
end

def self.down
drop_table :presentations
end
end
11 changes: 11 additions & 0 deletions test/fixtures/presentations.yml
@@ -0,0 +1,11 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html

# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value
8 changes: 8 additions & 0 deletions test/functional/presentations_controller_test.rb
@@ -0,0 +1,8 @@
require 'test_helper'

class PresentationsControllerTest < ActionController::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
4 changes: 4 additions & 0 deletions test/unit/helpers/presentations_helper_test.rb
@@ -0,0 +1,4 @@
require 'test_helper'

class PresentationsHelperTest < ActionView::TestCase
end
4 changes: 4 additions & 0 deletions test/unit/presentation_test.rb
@@ -0,0 +1,4 @@
require 'test_helper'

class PresentationTest < ActiveSupport::TestCase
end
Binary file added vendor/cache/abstract-1.0.0.gem
Binary file not shown.
Binary file added vendor/cache/actionmailer-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/actionpack-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/activemodel-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/activerecord-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/activeresource-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/activesupport-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/addressable-2.2.2.gem
Binary file not shown.
Binary file added vendor/cache/arel-2.0.6.gem
Binary file not shown.
Binary file added vendor/cache/builder-2.1.2.gem
Binary file not shown.
Binary file added vendor/cache/diff-lcs-1.1.2.gem
Binary file not shown.
Binary file added vendor/cache/erubis-2.6.6.gem
Binary file not shown.
Binary file added vendor/cache/faraday-0.5.3.gem
Binary file not shown.
Binary file added vendor/cache/i18n-0.5.0.gem
Binary file not shown.
Binary file added vendor/cache/kgio-2.1.1.gem
Binary file not shown.
Binary file added vendor/cache/mail-2.2.14.gem
Binary file not shown.
Binary file added vendor/cache/mime-types-1.16.gem
Binary file not shown.
Binary file added vendor/cache/multi_json-0.0.5.gem
Binary file not shown.
Binary file added vendor/cache/multipart-post-1.0.1.gem
Binary file not shown.
Binary file added vendor/cache/net-ldap-0.1.1.gem
Binary file not shown.
Binary file added vendor/cache/nokogiri-1.4.4.gem
Binary file not shown.
Binary file added vendor/cache/oa-basic-0.1.6.gem
Binary file not shown.
Binary file added vendor/cache/oa-core-0.1.6.gem
Binary file not shown.
Binary file added vendor/cache/oa-enterprise-0.1.6.gem
Binary file not shown.
Binary file added vendor/cache/oa-oauth-0.1.6.gem
Binary file not shown.
Binary file added vendor/cache/oa-openid-0.1.6.gem
Binary file not shown.
Binary file added vendor/cache/oauth-0.4.4.gem
Binary file not shown.
Binary file added vendor/cache/oauth2-0.1.0.gem
Binary file not shown.
Binary file added vendor/cache/omniauth-0.1.6.gem
Binary file not shown.
Binary file added vendor/cache/polyglot-0.3.1.gem
Binary file not shown.
Binary file added vendor/cache/pyu-ruby-sasl-0.0.3.2.gem
Binary file not shown.
Binary file added vendor/cache/rack-1.2.1.gem
Binary file not shown.
Binary file added vendor/cache/rack-mount-0.6.13.gem
Binary file not shown.
Binary file added vendor/cache/rack-openid-1.2.0.gem
Binary file not shown.
Binary file added vendor/cache/rack-test-0.5.7.gem
Binary file not shown.
Binary file added vendor/cache/rails-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/railties-3.0.3.gem
Binary file not shown.
Binary file added vendor/cache/rake-0.8.7.gem
Binary file not shown.
Binary file added vendor/cache/rest-client-1.6.1.gem
Binary file not shown.
Binary file added vendor/cache/rspec-2.4.0.gem
Binary file not shown.
Binary file added vendor/cache/rspec-core-2.4.0.gem
Binary file not shown.
Binary file added vendor/cache/rspec-expectations-2.4.0.gem
Binary file not shown.
Binary file added vendor/cache/rspec-mocks-2.4.0.gem
Binary file not shown.
Binary file added vendor/cache/ruby-openid-2.1.8.gem
Binary file not shown.
Binary file added vendor/cache/ruby-openid-apps-discovery-1.2.0.gem
Binary file not shown.
Binary file added vendor/cache/rubyntlm-0.1.1.gem
Binary file not shown.
Binary file added vendor/cache/sqlite3-ruby-1.3.2.gem
Binary file not shown.
Binary file added vendor/cache/thor-0.14.6.gem
Binary file not shown.
Binary file added vendor/cache/treetop-1.4.9.gem
Binary file not shown.
Binary file added vendor/cache/tzinfo-0.3.23.gem
Binary file not shown.
Binary file added vendor/cache/unicorn-3.3.1.gem
Binary file not shown.

0 comments on commit cbec445

Please sign in to comment.