remove ability to change home room

This commit is contained in:
Joshua Arts 2018-07-03 11:57:45 -04:00
parent ab7ae8434b
commit efcc312e9e
3 changed files with 10 additions and 20 deletions

View File

@ -90,14 +90,6 @@ class RoomsController < ApplicationController
redirect_to @room redirect_to @room
end end
# POST /:room_uid/home
def home
current_user.main_room = @room
current_user.save
redirect_to @room
end
# POST /:room_uid/:record_id # POST /:room_uid/:record_id
def update_recording def update_recording
meta = { meta = {

View File

@ -22,22 +22,21 @@
</div> </div>
</td> </td>
<td class="text-right"> <td class="text-right">
<div class="item-action dropdown"> <% if room != current_user.main_room %>
<a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fas fa-ellipsis-v"></i></a> <div class="item-action dropdown">
<div class="dropdown-menu dropdown-menu-right"> <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fas fa-ellipsis-v"></i></a>
<%= link_to room, class: "dropdown-item" do %> <div class="dropdown-menu dropdown-menu-right">
<i class="dropdown-icon fas fa-cog"></i> Room Settings <!--
<% end %> <%= link_to room, class: "dropdown-item" do %>
<% if room != current_user.main_room %> <i class="dropdown-icon fas fa-cog"></i> Room Settings
<%= button_to make_home_path(room), class: "dropdown-item" do %>
<i class="dropdown-icon fas fa-home"></i> Make Home Room
<% end %> <% end %>
-->
<%= button_to room, method: :delete, data: { confirm: 'Are you sure?' }, class: "dropdown-item" do %> <%= button_to room, method: :delete, data: { confirm: 'Are you sure?' }, class: "dropdown-item" do %>
<i class="dropdown-icon far fa-trash-alt"></i> Delete <i class="dropdown-icon far fa-trash-alt"></i> Delete
<% end %> <% end %>
<% end %> </div>
</div> </div>
</div> <% end %>
</td> </td>
</tbody> </tbody>
</table> </table>

View File

@ -36,7 +36,6 @@ Rails.application.routes.draw do
post '/', to: 'rooms#join' post '/', to: 'rooms#join'
post '/start', to: 'rooms#start', as: :start_room post '/start', to: 'rooms#start', as: :start_room
get '/logout', to: 'rooms#logout', as: :logout_room get '/logout', to: 'rooms#logout', as: :logout_room
post '/home', to: 'rooms#home', as: :make_home
# Mange recordings. # Mange recordings.
scope '/:record_id' do scope '/:record_id' do