Skip to content
Snippets Groups Projects
Unverified Commit 2359d125 authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fix bug that caused room edit to clear settings (#2649)

parent 7845d35d
No related branches found
No related tags found
No related merge requests found
......@@ -203,12 +203,17 @@ class RoomsController < ApplicationController
# Update the rooms values
room_settings_string = create_room_settings_string(options)
@room.update_attributes(
attributes = {
name: options[:name],
room_settings: room_settings_string,
access_code: options[:access_code],
moderator_access_code: options[:moderator_access_code]
)
}
unless params[:setting] == "rename_header"
attributes[:room_settings] = room_settings_string
attributes[:access_code] = options[:access_code]
attributes[:moderator_access_code] = options[:moderator_access_code]
end
@room.update(attributes)
flash[:success] = I18n.t("room.update_settings_success")
rescue => e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment