Updated rubocop and fixed issues (#490)

This commit is contained in:
farhatahmad
2019-05-02 15:44:00 -04:00
committed by Jesus Federico
parent bc57caa806
commit a0c99dde47
15 changed files with 122 additions and 1179 deletions

View File

@ -75,9 +75,7 @@ class PasswordResetsController < ApplicationController
# Checks expiration of reset token.
def check_expiration
if current_user.password_reset_expired?
redirect_to new_password_reset_url, alert: I18n.t("expired_reset_token")
end
redirect_to new_password_reset_url, alert: I18n.t("expired_reset_token") if current_user.password_reset_expired?
end
def reset_link

View File

@ -144,8 +144,8 @@ class RoomsController < ApplicationController
begin
redirect_to @room.join_path(current_user.name, opts, current_user.uid)
rescue BigBlueButton::BigBlueButtonException => exc
redirect_to room_path, alert: I18n.t(exc.key.to_s.underscore, default: I18n.t("bigbluebutton_exception"))
rescue BigBlueButton::BigBlueButtonException => e
redirect_to room_path, alert: I18n.t(e.key.to_s.underscore, default: I18n.t("bigbluebutton_exception"))
end
# Notify users that the room has started.
@ -192,7 +192,7 @@ class RoomsController < ApplicationController
def create_room_settings_string(mute_res, client_res)
room_settings = {}
room_settings["muteOnStart"] = mute_res == "1" ? true : false
room_settings["muteOnStart"] = mute_res == "1"
if client_res.eql? "html5"
room_settings["joinViaHtml5"] = true