diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb
index febf613..e1e26ab 100644
--- a/app/views/layouts/_header.html.erb
+++ b/app/views/layouts/_header.html.erb
@@ -5,13 +5,16 @@
diff --git a/app/views/static_pages/index.html.erb b/app/views/static_pages/index.html.erb
index 20aa85c..b1e9891 100644
--- a/app/views/static_pages/index.html.erb
+++ b/app/views/static_pages/index.html.erb
@@ -14,7 +14,12 @@
<% @tournaments.each do |tournament| %>
| <%= tournament.name %> |
- <%= link_to 'Show', tournament, :class=>"btn" %><%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn" %><%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %> |
+ <%= link_to 'Show', tournament, :class=>"btn" %>
+ <% if user_signed_in? %>
+ <%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn" %>
+ <%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
+ <% end %>
+ |
<% end %>
diff --git a/config/routes.rb b/config/routes.rb
index 30a2a82..52b6d09 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,4 +1,5 @@
Wrestling::Application.routes.draw do
+ devise_for :users
resources :tournaments
resources :schools
diff --git a/db/schema.rb b/db/schema.rb
index fd10b7b..06f0b9d 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140121020833) do
+ActiveRecord::Schema.define(version: 20140122030856) do
create_table "schools", force: true do |t|
t.string "name"
@@ -30,6 +30,24 @@ ActiveRecord::Schema.define(version: 20140121020833) do
t.datetime "updated_at"
end
+ create_table "users", force: true do |t|
+ t.string "email", default: "", null: false
+ t.string "encrypted_password", 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, null: false
+ 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.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ 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
+
create_table "weights", force: true do |t|
t.integer "max"
t.datetime "created_at"