Fixed workshop translation saving + ordered guests

This commit is contained in:
Godwin
2017-08-12 11:07:49 -07:00
parent b74b3062e8
commit d23c5034ed
7 changed files with 15 additions and 8 deletions
@@ -884,6 +884,8 @@ class ConferenceAdministrationController < ApplicationController
end
end
@guests = @guests.sort_by { |k,v| v.user.firstname }
return @hosts_affected_by_guests
end
+7 -2
View File
@@ -147,8 +147,13 @@ class WorkshopsController < ApplicationController
# only save if the text has changed, if we want to make sure only to update the translator id if necessary
workshop.save_translations if do_save
elsif can_edit
workshop.title = title
workshop.info = info
if workshop.locale.nil? || workshop.locale.to_s == I18n.locale.to_s
workshop.title = title
workshop.info = info
else
workshop.set_column_for_locale(:title, workshop.locale, title)
workshop.set_column_for_locale(:info, workshop.locale, info)
end
workshop.languages = (params[:languages] || {}).keys.to_json
workshop.needs = (params[:needs] || {}).keys.to_json
workshop.theme = params[:theme] == 'other' ? params[:other_theme] : params[:theme]