diff --git a/app/controllers/archives_controller.rb b/app/controllers/archives_controller.rb index 5eb5b0d..c4dc4cb 100644 --- a/app/controllers/archives_controller.rb +++ b/app/controllers/archives_controller.rb @@ -1,7 +1,9 @@ class ArchivesController < ApplicationController def self.custom_widget_data 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 #avoid the categories to be not in the ArchiveCategory def serve_cmap