diff --git a/app/controllers/admin/reports_controller.rb b/app/controllers/admin/reports_controller.rb index 8a972a859a..7e944cd341 100644 --- a/app/controllers/admin/reports_controller.rb +++ b/app/controllers/admin/reports_controller.rb @@ -22,10 +22,7 @@ module Admin def show @report = report_class.new(spree_current_user, params, render: render_data?) - @background_reports = OpenFoodNetwork::FeatureToggle - .enabled?(:background_reports, spree_current_user) - - if @background_reports && request.post? + if request.post? rendering_options # stores user preferences return background(report_format) diff --git a/app/views/admin/reports/show.html.haml b/app/views/admin/reports/show.html.haml index 8f334e467f..c9faa55267 100644 --- a/app/views/admin/reports/show.html.haml +++ b/app/views/admin/reports/show.html.haml @@ -1,9 +1,9 @@ - content_for :page_title do = @report_title -- content_for :minimal_js, true if @background_reports +- content_for :minimal_js, true -- options = @background_reports ? { data: { remote: "true" } } : {} +- options = { data: { remote: "true" } } = form_for @report.search, { url: url_for }.merge(options) do |f| = hidden_field_tag "uuid", request.uuid diff --git a/lib/open_food_network/feature_toggle.rb b/lib/open_food_network/feature_toggle.rb index ef23b78a96..5a4c6d79ae 100644 --- a/lib/open_food_network/feature_toggle.rb +++ b/lib/open_food_network/feature_toggle.rb @@ -32,9 +32,6 @@ module OpenFoodNetwork "api_v1" => <<~DESC, Enable the new API at /api/v1 DESC - "background_reports" => <<~DESC, - Generate reports in a background process to limit memory consumption. - DESC "match_shipping_categories" => <<~DESC, During checkout, show only shipping methods that support all shipping categories. Activating this feature for an enterprise owner @@ -54,9 +51,6 @@ module OpenFoodNetwork # Copy features here that were activated in a migration so that new # instances, development and test environments have the feature active. ACTIVE_BY_DEFAULT = { - "background_reports" => <<~DESC, - Generate reports in a background process to limit memory consumption. - DESC }.freeze def self.setup!