Add logic for showing empty reports initially

This commit is contained in:
Maikel Linke
2018-05-03 10:27:44 +10:00
parent 031c4d417e
commit fcd41c67fa

View File

@@ -239,6 +239,12 @@ Spree::Admin::ReportsController.class_eval do
private
# We don't want to render data unless search params are supplied.
# Compiling data can take a long time.
def render_content?
request.post?
end
def render_report(header, table, create_csv, csv_file_name)
send_data csv_report(header, table), filename: csv_file_name if create_csv
# Rendering HTML is the default.