Sha256: 6c3e59b36e54b84bd9208d84d8ff622462274efc2ffcd80fdbba44cdf19dd1ce

Contents?: true

Size: 323 Bytes

Versions: 17

Compression:

Stored size: 323 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Ingredients
    class SpreeVariant < Alchemy::Ingredient
      related_object_alias :variant, class_name: "Spree::Variant"

      def preview_text(maxlength)
        return unless variant

        variant.descriptive_name[0..maxlength - 1]
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
alchemy-solidus-7.5.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-7.4.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-7.3.2 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-7.1.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-7.0.1 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-7.0.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.3.2 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.3.1 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.3.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.2.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.1.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.0.1 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-6.0.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-5.0.0 app/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-4.1.0 lib/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-4.0.0 lib/models/alchemy/ingredients/spree_variant.rb
alchemy-solidus-4.0.0.pre.b2 lib/models/alchemy/ingredients/spree_variant.rb