Skip to content

Commit 9bbc2ef

Browse files
authored
Merge pull request #55 from SuperGoodSoft/fix-backend-menu-item-deprecation
Fix deprecated MenuItem arguments
2 parents 3d4d2db + 1dfe6da commit 9bbc2ef

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lib/solidus_reports/engine.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,9 @@ class Engine < Rails::Engine
1717
end
1818

1919
initializer "solidus_reports.environment", before: :load_config_initializers do
20-
# rubocop:disable Lint/ConstantDefinitionInBlock
21-
# rubocop:disable Lint/OrAssignmentToConstant
22-
REPORT_TABS ||= [:reports].freeze
23-
# rubocop:enable Lint/ConstantDefinitionInBlock
24-
# rubocop:enable Lint/OrAssignmentToConstant
25-
2620
new_item = Spree::BackendConfiguration::MenuItem.new(
27-
REPORT_TABS,
28-
"file",
21+
label: :reports,
22+
icon: "file",
2923
condition: -> { can?(:admin, :reports) }
3024
)
3125
Spree::Backend::Config.menu_items << new_item

0 commit comments

Comments
 (0)