store display_summary_row in the model

This commit is contained in:
Mohamed ABDELLANI
2022-11-16 12:27:52 +01:00
parent 709dfa42bc
commit 0fb273ce93
2 changed files with 3 additions and 2 deletions

View File

@@ -50,7 +50,6 @@ module Admin
end
# Initialize data
params[:display_summary_row] = true if request.get?
@params_fields_to_show = render_options.options[:fields_to_show]
@data = Reporting::FrontendData.new(spree_current_user)

View File

@@ -74,11 +74,13 @@ module ReportsActions
else
[]
end
new_instance.options[:display_summary_row] = request.get? || params[:display_summary_row].present?
end
if params[:fields_to_show].present?
@render_options.options[:fields_to_show] = params[:fields_to_show]
@render_options.save
end
@render_options.options[:display_summary_row] = params[:display_summary_row].present?
@render_options.save
@render_options
end
end