diff --git a/app/controllers/counter_controller.rb b/app/controllers/counter_controller.rb index 21431d6..f00ec59 100644 --- a/app/controllers/counter_controller.rb +++ b/app/controllers/counter_controller.rb @@ -8,6 +8,7 @@ class CounterController < ApplicationController private def associate! + session[:cluster_uuid] = params[:uuid] if params[:uuid] redirect_to cluster_path unless valid_cluster? end end diff --git a/config/routes.rb b/config/routes.rb index b9992fe..192fc33 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,8 @@ Rails.application.routes.draw do root 'counter#show' - get '/cluster', to: 'cluster#new' + get '/cluster', to: 'cluster#show' post '/cluster', to: 'cluster#create' + + get '/cluster/:uuid', to: 'counter#show' end