Sha256: 89d36bde09e3c4316cf1cd1341820b642dcbf6a97907402ed53c27ddbc574671

Contents?: true

Size: 311 Bytes

Versions: 18

Compression:

Stored size: 311 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Ingredients
    class SpreeProduct < Alchemy::Ingredient
      related_object_alias :product, class_name: "Spree::Product"

      def preview_text(maxlength)
        return unless product

        product.name[0..maxlength - 1]
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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