Fix bug for rails 4.2.

This commit is contained in:
BoHung Chiu 2023-07-05 09:12:46 +08:00
parent b8dafc5e47
commit e6fde501e9
1 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,9 @@
class ArchivesController < ApplicationController class ArchivesController < ApplicationController
def self.custom_widget_data def self.custom_widget_data
ac = ActionController::Base.new ac = ActionController::Base.new
ac.render_to_string("archives/custom_widget_data",:locals=>{:@custom_data_field=>@custom_data_field,:@field_name=>@field_name}) ac.instance_variable_set(:@custom_data_field, @custom_data_field)
ac.instance_variable_set(:@field_name, @field_name)
ac.render_to_string("archives/custom_widget_data")
end end
#avoid the categories to be not in the ArchiveCategory #avoid the categories to be not in the ArchiveCategory
def serve_cmap def serve_cmap