mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-05-04 21:31:08 +00:00
Installed devise
This commit is contained in:
@@ -5,13 +5,16 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul class="nav pull-right">
|
<ul class="nav pull-right">
|
||||||
<li><%= link_to "Home", root_path %></li>
|
<li><%= link_to "Home", root_path %></li>
|
||||||
<li><%= link_to "School Scores", '/static_pages/school' %></li>
|
<% if @tournament %>
|
||||||
<li><%= link_to "Brackets" , '#' %></li>
|
<li><%= link_to "Brackets" , '#' %></li>
|
||||||
<li><%= link_to "Bout Board" , '#' %></li>
|
<li><%= link_to "Bout Board" , '#' %></li>
|
||||||
<% #If logged in %>
|
<% end %>
|
||||||
<li><%= link_to "Admin" , '/admin/index' %></li>
|
<% if user_signed_in? %>
|
||||||
<% #ELSE %>
|
<li><%= link_to "Admin" , '/admin/index' %></li>
|
||||||
<li><%= link_to "Log In" , '#' %></li>
|
<li><%= link_to "Log Out", destroy_user_session_path, method: :delete %></li>
|
||||||
|
<% else %>
|
||||||
|
<li><%= link_to "Log In" , new_user_session_path %></li>
|
||||||
|
<% end %>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,12 @@
|
|||||||
<% @tournaments.each do |tournament| %>
|
<% @tournaments.each do |tournament| %>
|
||||||
<tr>
|
<tr>
|
||||||
<td><%= tournament.name %></td>
|
<td><%= tournament.name %></td>
|
||||||
<td><%= 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" %></td>
|
<td><%= 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 %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Wrestling::Application.routes.draw do
|
Wrestling::Application.routes.draw do
|
||||||
|
devise_for :users
|
||||||
resources :tournaments
|
resources :tournaments
|
||||||
|
|
||||||
resources :schools
|
resources :schools
|
||||||
|
|||||||
20
db/schema.rb
20
db/schema.rb
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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|
|
create_table "schools", force: true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
@@ -30,6 +30,24 @@ ActiveRecord::Schema.define(version: 20140121020833) do
|
|||||||
t.datetime "updated_at"
|
t.datetime "updated_at"
|
||||||
end
|
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|
|
create_table "weights", force: true do |t|
|
||||||
t.integer "max"
|
t.integer "max"
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
|
|||||||
Reference in New Issue
Block a user