Fix bug for rails 4.2.

This commit is contained in:
BoHung Chiu 2023-07-05 09:15:08 +08:00
parent 75bec0fe3d
commit b2c3627afa
1 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,9 @@ class EPapersController < ApplicationController
EmptyImgUrl = "#{EmptyImg}\" style=\"display: none;"
def self.custom_widget_data
ac = ActionController::Base.new
ac.render_to_string("e_papers/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("e_papers/custom_widget_data")
end
def index
page_no = OrbitHelper.page_number