app/components/solidus_admin/layout/navigation/item/component.rb in solidus_admin-0.3.1 vs app/components/solidus_admin/layout/navigation/item/component.rb in solidus_admin-0.3.2

- old
+ new

@@ -4,24 +4,21 @@ class SolidusAdmin::Layout::Navigation::Item::Component < SolidusAdmin::BaseComponent with_collection_parameter :item # @param item [SolidusAdmin::MenuItem] # @param fullpath [String] the current path - # @param url_helpers [#solidus_admin, #spree] context for generating paths def initialize( item:, - fullpath: "#", - url_helpers: Struct.new(:spree, :solidus_admin).new(spree, solidus_admin) + fullpath: "#" ) @item = item - @url_helpers = url_helpers @fullpath = fullpath end def path - @item.path(@url_helpers) + @item.path(self) end def active? - @item.active?(@url_helpers, @fullpath) + @item.active?(self, @fullpath) end end