Switch object in the ability to access reports. This adapts to this change in Spree: 3685569db4

Adapt NavigationHelper to return the controller object for reports so that Reports tab works correctly.
This commit is contained in:
luisramos0
2019-03-23 17:42:10 +00:00
parent 1fc4b7fd2a
commit bc8bca074c
6 changed files with 15 additions and 10 deletions

View File

@@ -250,7 +250,7 @@ Spree::Admin::ReportsController.class_eval do
:xero_invoices,
:packing
]
reports = all_reports.select { |action| can? action, :report }
reports = all_reports.select { |action| can? action, Spree::Admin::ReportsController }
reports.map { |report| [report, describe_report(report)] }.to_h
end