diff --git a/Gemfile b/Gemfile
index f4561ec..37bcb5b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -49,10 +49,11 @@ gem 'spring', group: :development
end
#Other
gem 'devise'
- gem 'cancan'
+ gem 'cancancan'
gem 'round_robin_tournament'
gem 'rb-readline'
- group :development do
+ gem 'jquery-datatables-rails'
+ group :development do
gem 'puma'
end
diff --git a/Gemfile.lock b/Gemfile.lock
index 41dd58b..e9ee06b 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -39,7 +39,7 @@ GEM
arel (6.0.0)
bcrypt (3.1.10)
builder (3.2.2)
- cancan (1.6.10)
+ cancancan (1.10.1)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@@ -63,6 +63,11 @@ GEM
jbuilder (2.2.13)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
+ jquery-datatables-rails (3.3.0)
+ actionpack (>= 3.1)
+ jquery-rails
+ railties (>= 3.1)
+ sass-rails
jquery-rails (4.0.3)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
@@ -72,15 +77,15 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
- mime-types (2.4.3)
+ mime-types (2.5)
mini_portile (0.6.2)
- minitest (5.6.0)
+ minitest (5.6.1)
multi_json (1.11.0)
mysql2 (0.3.18)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
orm_adapter (0.5.0)
- passenger (5.0.6)
+ passenger (5.0.7)
rack
rake (>= 0.8.1)
pg (0.18.1)
@@ -121,6 +126,7 @@ GEM
rake (10.4.2)
rb-readline (0.5.2)
rdoc (4.2.0)
+ json (~> 1.4)
responders (2.1.0)
railties (>= 4.2.0, < 5)
round_robin_tournament (0.0.1)
@@ -133,7 +139,7 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
- spring (1.3.4)
+ spring (1.3.5)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
@@ -161,10 +167,11 @@ PLATFORMS
ruby
DEPENDENCIES
- cancan
+ cancancan
coffee-rails (~> 4.0.0)
devise
jbuilder (~> 2.0)
+ jquery-datatables-rails
jquery-rails
mysql2
passenger
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
index aba7d2d..c8d9d97 100644
--- a/app/assets/javascripts/application.js
+++ b/app/assets/javascripts/application.js
@@ -11,4 +11,7 @@
// about supported directives.
//
//= require_tree .
+//= require jquery
+//= require jquery_ujs
+//= require dataTables/jquery.dataTables
diff --git a/app/assets/javascripts/matches.js.coffee b/app/assets/javascripts/matches.js.coffee
index a09bb5d..43d766d 100644
--- a/app/assets/javascripts/matches.js.coffee
+++ b/app/assets/javascripts/matches.js.coffee
@@ -1,6 +1,4 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
-jQuery ->
- $('#matches').dataTable()
- dJQueryUI: true
+
diff --git a/app/assets/javascripts/tournaments.js.coffee b/app/assets/javascripts/tournaments.js.coffee
index 9afa7af..24f83d1 100644
--- a/app/assets/javascripts/tournaments.js.coffee
+++ b/app/assets/javascripts/tournaments.js.coffee
@@ -1,6 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
-jQuery ->
- $('#tournaments').dataTable()
- dJQueryUI: true
\ No newline at end of file
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 2e6e7ab..efcaa8d 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -12,4 +12,5 @@
*
*= require_tree .
*= require_self
+ *= require dataTables/jquery.dataTables
*/
\ No newline at end of file
diff --git a/app/views/layouts/_cdn.html.erb b/app/views/layouts/_cdn.html.erb
index 01039df..f729f8d 100644
--- a/app/views/layouts/_cdn.html.erb
+++ b/app/views/layouts/_cdn.html.erb
@@ -1,17 +1,12 @@
-
-
-
-
-
diff --git a/app/views/layouts/_header.html.erb b/app/views/layouts/_header.html.erb
index 26a19ca..978e7b5 100644
--- a/app/views/layouts/_header.html.erb
+++ b/app/views/layouts/_header.html.erb
@@ -11,7 +11,7 @@
<%= link_to "Team Scores" , "/static_pages/team_scores?tournament=#{@tournament.id}" %>
<% end %>
<% if user_signed_in? %>
- <%= link_to "Log Out", destroy_user_session_path, method: :delete %>
+ <%=link_to "Log out", destroy_user_session_url ,:method => 'delete' %>
<% else %>
<%= link_to "Log In" , new_user_session_path %>
<% end %>
diff --git a/app/views/static_pages/index.html.erb b/app/views/static_pages/index.html.erb
index 5c38629..2092f9e 100644
--- a/app/views/static_pages/index.html.erb
+++ b/app/views/static_pages/index.html.erb
@@ -1,10 +1,15 @@
Pick A Tournament
+
<% if user_signed_in? %>
<%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-default" %>
<% end %>
-
+
| Name |
diff --git a/app/views/static_pages/up_matches.html.erb b/app/views/static_pages/up_matches.html.erb
index 14614db..3a5f712 100644
--- a/app/views/static_pages/up_matches.html.erb
+++ b/app/views/static_pages/up_matches.html.erb
@@ -1,10 +1,15 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
+
Upcoming Matches
-
+
| Round |
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 4509ff7..2f36199 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -14,7 +14,6 @@ Devise.setup do |config|
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
-
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
diff --git a/config/routes.rb b/config/routes.rb
index dfd5dac..4cfc932 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -4,6 +4,7 @@ Wrestling::Application.routes.draw do
resources :matches
devise_for :users
+
resources :tournaments
resources :schools