Fetch undated order cycles by default for index actions

This commit is contained in:
Rob Harrington
2015-11-12 12:08:39 +11:00
parent 6e8d807408
commit 4e4de65cba

View File

@@ -114,7 +114,7 @@ module Admin
def load_data_for_index
@show_more = !!params[:show_more]
params[:q] ||= {}
params[:q][:orders_close_at_gt] = 31.days.ago unless @show_more || params[:q][:orders_close_at_gt].present?
params[:q][:orders_close_at_null_or_orders_close_at_gt] = 31.days.ago unless @show_more || params[:q][:orders_close_at_gt].present?
@order_cycle_set = OrderCycleSet.new :collection => (@collection = collection)
end