From 36d83b99c6729099c3bb50b429f734e593afa4f2 Mon Sep 17 00:00:00 2001 From: jfederico Date: Wed, 19 Oct 2016 15:57:03 -0400 Subject: [PATCH] Changed the routes so we have only 3 locations to configure in nginx --- app/views/landing/meeting.html.erb | 2 +- app/views/landing/room.html.erb | 2 +- config/routes.rb | 18 ++++++++++++------ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/app/views/landing/meeting.html.erb b/app/views/landing/meeting.html.erb index 532b6b86..f2eb6687 100644 --- a/app/views/landing/meeting.html.erb +++ b/app/views/landing/meeting.html.erb @@ -6,7 +6,7 @@
<% if !current_user.nil? %> Hello <%= current_user.name %> - <%= link_to "Logout", "/logout" %> + <%= link_to "Logout", user_logout_url() %>
<%= link_to 'Personal Room', current_user.room_url %>
<% end %>
diff --git a/app/views/landing/room.html.erb b/app/views/landing/room.html.erb index 3a64bfda..c77170dd 100644 --- a/app/views/landing/room.html.erb +++ b/app/views/landing/room.html.erb @@ -6,7 +6,7 @@
<% if admin? %> Hello <%= current_user.name %> - <%= link_to "Logout", "/logout" %> + <%= link_to "Logout", user_logout_url() %> <% else %> <%= link_to "Login", "/auth/twitter" %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index 0da98bb0..a980cfba 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,13 +1,19 @@ Rails.application.routes.draw do resources :users, only: [:edit, :update] - get 'bbb/join/:resource/:id', to: 'bbb#join', as: :bbb_join - - get '/meetings/new', to: 'landing#new_meeting', as: :new_meeting - get '/:resource(/:id)', to: 'landing#index', as: :resource - + # This should be removed once before being released get '/auth/:provider/callback', to: 'sessions#create' - get '/logout', to: 'sessions#destroy' + ########################################################### + + get '/users/auth/:provider/callback', to: 'sessions#create' + get '/users/logout', to: 'sessions#destroy', as: :user_logout + get '/meetings/join/:resource/:id', to: 'bbb#join', as: :bbb_join + get '/meetings/new', to: 'landing#new_meeting', as: :new_meeting + + # There are two resources [meetings|rooms] + # meetings offer a landing page for NON authenticated users to create and join session in BigBlueButton + # rooms offer a customized landing page for authenticated users to create and join session in BigBlueButton + get '/:resource(/:id)', to: 'landing#index', as: :resource root to: 'landing#meeting', :resource => "meetings" # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html