Sha256: bcf8506a621de0dff88b38c08583760db1aeef840f5d5fcac64c3afa7f0c1426

Contents?: true

Size: 765 Bytes

Versions: 15

Compression:

Stored size: 765 Bytes

Contents

# In versions of Solidus prior to 2.8, we override this class to
# add the match_path option to the initializer. (Version 2.8 has
# this option already.) This option is used in the tabs partial
# to configure the paths for which a given tab is active.
#
if Spree.solidus_gem_version < Gem::Version.new('2.8')
  Spree::BackendConfiguration::MenuItem.class_eval do
    attr_reader :match_path

    def initialize(
      sections,
      icon,
      condition: nil,
      label: nil,
      partial: nil,
      url: nil,
      match_path: nil
    )

      @condition = condition || -> { true }
      @sections = sections
      @icon = icon
      @label = label || sections.first
      @partial = partial
      @url = url
      @match_path = match_path
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
alchemy-solidus-4.0.0.pre.b2 config/initializers/solidus.rb
alchemy-solidus-4.0.0.pre.b1 config/initializers/solidus.rb
alchemy-solidus-3.3.0 config/initializers/solidus.rb
alchemy-solidus-3.2.2 config/initializers/solidus.rb
alchemy-solidus-3.2.1 config/initializers/solidus.rb
alchemy-solidus-3.2.0 config/initializers/solidus.rb
alchemy-solidus-3.1.1 config/initializers/solidus.rb
alchemy-solidus-3.1.0 config/initializers/solidus.rb
alchemy-solidus-3.0.2 config/initializers/solidus.rb
alchemy-solidus-3.0.1 config/initializers/solidus.rb
alchemy-solidus-3.0.0 config/initializers/solidus.rb
alchemy-solidus-2.5.1 config/initializers/solidus.rb
alchemy-solidus-2.5.0 config/initializers/solidus.rb
alchemy-solidus-2.4.0 config/initializers/solidus.rb
alchemy-solidus-2.3.2 config/initializers/solidus.rb