merge fix bug #14

Merged
chiu merged 2 commits from 123/seminar:master into master 2023-09-27 09:21:07 +00:00
2 changed files with 8 additions and 2 deletions
Showing only changes of commit 24f85dd3e3 - Show all commits

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