change /start to post

This commit is contained in:
Josh 2018-06-07 16:57:56 -04:00
parent 2b28c750a8
commit 520c489e62
3 changed files with 4 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class RoomsController < ApplicationController
redirect_to current_user.main_room
end
# GET /r/:room_uid/start
# POST /r/:room_uid/start
def start
# Join the user in and start the meeting.
opts = default_meeting_options

View File

@ -28,9 +28,9 @@
</div>
<div class="col-lg-3 col-sm-12 bottom-div mt-5">
<% if @is_running %>
<div class="btn btn-success active btn-block px-7 start-button float-right">In Progress</div>
<div class="btn btn-success btn-block px-7 start-button float-right">In Progress</div>
<% else %>
<%= link_to "Start", start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
<%= button_to "Start", start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
<% end %>
</div>
</div>

View File

@ -6,7 +6,7 @@ Rails.application.routes.draw do
# Extended room routes.
scope '/r/:room_uid' do
post '/', to: 'rooms#join'
get '/start', to: 'rooms#start', as: :start_room
post '/start', to: 'rooms#start', as: :start_room
get '/logout', to: 'rooms#logout', as: :logout_room
post '/home', to: 'rooms#home', as: :make_home