add ability to configure terms and conditions

This commit is contained in:
Josh
2018-06-21 16:17:18 -04:00
parent 2dc033ee20
commit c16197670b
12 changed files with 67 additions and 10 deletions

View File

@ -1,5 +1,6 @@
class RoomsController < ApplicationController
before_action :validate_accepted_terms, unless: -> { !Rails.configuration.terms }
before_action :find_room, except: :create
before_action :verify_room_ownership, except: [:create, :show, :join, :logout]
@ -159,4 +160,8 @@ class RoomsController < ApplicationController
redirect_to root_path
end
end
def validate_accepted_terms
redirect_to terms_path unless current_user.accepted_terms
end
end