Skip to content
This repository was archived by the owner on Apr 29, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions app/models/event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ class Event < ActiveRecord::Base
belongs_to :location
has_many :volunteerRsvps
has_many :users, :through => :volunteerRsvps
validates_presence_of :title
validates_presence_of :location
validates_presence_of :date
end
3 changes: 2 additions & 1 deletion app/views/events/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<%= render 'form' %>

<%= link_to 'Show', @event %> |
<%= link_to 'Back', events_path %>
<%= link_to 'Back', events_path %> |
<%= link_to 'Manage Locations', locations_path %>
4 changes: 3 additions & 1 deletion app/views/events/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
<br />

<%= link_to 'New Event', new_event_path %>

|
<%= link_to 'Add Your Skills',edit_user_registration_path %>
|
<%= link_to 'Manage Locations', locations_path %>

2 changes: 2 additions & 0 deletions app/views/events/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
<%= render 'form' %>

<%= link_to 'Back', events_path %>
|
<%= link_to 'Manage Locations', locations_path %>
158 changes: 79 additions & 79 deletions db/schema.rb
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20120313184512) do

create_table "events", :force => true do |t|
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "date"
t.integer "location_id"
end

create_table "locations", :force => true do |t|
t.string "name"
t.text "address"
t.datetime "created_at"
t.datetime "updated_at"
end

create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.integer "failed_attempts", :default => 0
t.string "unlock_token"
t.datetime "locked_at"
t.string "authentication_token"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "teaching"
t.boolean "taing"
t.boolean "coordinating"
t.boolean "childcaring"
t.boolean "writing"
t.boolean "hacking"
t.boolean "designing"
t.boolean "evangelizing"
t.boolean "mentoring"
t.boolean "macosx"
t.boolean "windows"
t.boolean "linux"
t.string "other"
end

add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true

create_table "volunteer_rsvps", :force => true do |t|
t.integer "user_id"
t.integer "event_id"
t.boolean "attending"
t.datetime "created_at"
t.datetime "updated_at"
end

end
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120313184512) do
create_table "events", :force => true do |t|
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "date"
t.integer "location_id"
end
create_table "locations", :force => true do |t|
t.string "name"
t.text "address"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "users", :force => true do |t|
t.string "email", :default => "", :null => false
t.string "encrypted_password", :limit => 128, :default => "", :null => false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", :default => 0
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.integer "failed_attempts", :default => 0
t.string "unlock_token"
t.datetime "locked_at"
t.string "authentication_token"
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "teaching"
t.boolean "taing"
t.boolean "coordinating"
t.boolean "childcaring"
t.boolean "writing"
t.boolean "hacking"
t.boolean "designing"
t.boolean "evangelizing"
t.boolean "mentoring"
t.boolean "macosx"
t.boolean "windows"
t.boolean "linux"
t.string "other"
end
add_index "users", ["confirmation_token"], :name => "index_users_on_confirmation_token", :unique => true
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
add_index "users", ["unlock_token"], :name => "index_users_on_unlock_token", :unique => true
create_table "volunteer_rsvps", :force => true do |t|
t.integer "user_id"
t.integer "event_id"
t.boolean "attending"
t.datetime "created_at"
t.datetime "updated_at"
end
end