fix for scan

This commit is contained in:
rulingcom 2024-11-25 19:33:21 +08:00
parent fc39a817ab
commit e459d8e828
1 changed files with 3 additions and 2 deletions

View File

@ -4,7 +4,7 @@ class UniversalTablesController < ApplicationController
params = OrbitHelper.params params = OrbitHelper.params
table = UTable.where(:category_id => OrbitHelper.page_categories.first).first rescue nil table = UTable.where(:category_id => OrbitHelper.page_categories.first).first rescue nil
page = OrbitHelper.page rescue Page.where(:page_id => params[:page_id]).first page = OrbitHelper.page rescue Page.where(:page_id => params[:page_id]).first
searchable_columns = [] searchable_columns = []
if !table.nil? if !table.nil?
reset = "hide" reset = "hide"
csrf_value = (0...46).map { ('a'..'z').to_a[rand(26)] }.join csrf_value = (0...46).map { ('a'..'z').to_a[rand(26)] }.join
@ -16,7 +16,8 @@ class UniversalTablesController < ApplicationController
query_string = '' query_string = ''
end end
query_string += "&page_no=#{params_no}" if params_no.present? query_string += "&page_no=#{params_no}" if params_no.present?
csrf_input = "<input type=\"hidden\" name=\"authenticity_token\" value=\"#{csrf_value}\">" # csrf_input = "<input type=\"hidden\" name=\"authenticity_token\" value=\"#{csrf_value}\">"
csrf_input = ""
have_serial_number = (page.layout != 'index1') have_serial_number = (page.layout != 'index1')
table_heads = table.table_columns.where(:display_in_index => true).asc(:order).collect do |tc| table_heads = table.table_columns.where(:display_in_index => true).asc(:order).collect do |tc|
field_key = tc.key field_key = tc.key