Merge pull request 'merge fix bug' (#14) from 123/seminar:master into master

Reviewed-on: https://gitlab.tp.rulingcom.com/spen/seminar/pulls/14
This commit is contained in:
chiu 2023-09-27 09:21:06 +00:00
commit dd935ebf89
3 changed files with 9 additions and 2 deletions

View File

@ -69,6 +69,7 @@ class SeminarSignup
sr.save sr.save
end end
end end
seminar_main.seminar_signups.delete(self) #avoid resave
if seminar_main.unassigned_seminar_signup_ids.delete(id) if seminar_main.unassigned_seminar_signup_ids.delete(id)
seminar_main.save seminar_main.save
end end

View File

@ -98,7 +98,10 @@ class CustomAnnouncementsController < ApplicationController
def self.custom_widget_data def self.custom_widget_data
@custom_configs = CustomBulletinConfig.all.to_a @custom_configs = CustomBulletinConfig.all.to_a
ac = ActionController::Base.new ac = ActionController::Base.new
ac.render_to_string("custom_announcements/custom_widget_data",:locals=>{:@custom_data_field=>@custom_data_field,:@custom_configs=>@custom_configs,:@field_name=>@field_name}) ac.instance_variable_set(:@custom_data_field, @custom_data_field)
ac.instance_variable_set(:@custom_configs, @custom_configs)
ac.instance_variable_set(:@field_name, @field_name)
ac.render_to_string("custom_announcements/custom_widget_data")
end end
def random_custom_announcement_widget def random_custom_announcement_widget
pack_data(true) pack_data(true)

View File

@ -133,7 +133,10 @@ class CustomGalleriesController < ApplicationController
def self.custom_widget_data def self.custom_widget_data
@custom_configs = CustomAlbumConfig.all.to_a @custom_configs = CustomAlbumConfig.all.to_a
ac = ActionController::Base.new ac = ActionController::Base.new
ac.render_to_string("custom_galleries/custom_widget_data",:locals=>{:@custom_data_field=>@custom_data_field,:@custom_configs=>@custom_configs,:@field_name=>@field_name}) ac.instance_variable_set(:@custom_data_field, @custom_data_field)
ac.instance_variable_set(:@custom_configs, @custom_configs)
ac.instance_variable_set(:@field_name, @field_name)
ac.render_to_string("custom_galleries/custom_widget_data")
end end
def custom_album_widget def custom_album_widget
@custom_album_setting = CustomAlbumSetting.first @custom_album_setting = CustomAlbumSetting.first