1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-05 06:07:20 +00:00

Using action cable to send stats updates to the client and made a spectate page.

This commit is contained in:
2025-04-21 17:12:54 -04:00
parent 44fb5388b4
commit 3e4317dbc5
15 changed files with 565 additions and 88 deletions

View File

@@ -3,16 +3,15 @@
# not a terminal started via bin/rails console! Add "console" to any action or any ERB template view
# to make the web console appear.
development:
adapter: solid_cable
database: cable
polling_interval: 0.1.seconds
message_retention: 1.day
adapter: async
test:
adapter: test
production:
adapter: solid_cable
database: cable
connects_to:
database:
writing: cable
polling_interval: 0.1.seconds
message_retention: 1.day
message_retention: 1.day

View File

@@ -1,8 +1,16 @@
Wrestling::Application.routes.draw do
# Mount Action Cable server
mount ActionCable.server => '/cable'
resources :mats
post "mats/:id/assign_next_match" => "mats#assign_next_match", :as => :assign_next_match
resources :matches
resources :matches do
member do
get :stat
get :spectate
end
end
# Replace devise_for :users with custom routes
get '/login', to: 'sessions#new'
@@ -89,8 +97,6 @@ Wrestling::Application.routes.draw do
get "/api/index" => "api#index"
post "/api/tournaments/new" => "newTournament"
get "/matches/:id/stat" => "matches#stat", :as => :stat_match_path
resources :tournaments do
member do
post :generate_school_keys