Sha256: c86e01a41cf78ca097a65ddd04cd87e4f8fa1ad295ea8f6a628c99a7551f8a9e

Contents?: true

Size: 194 Bytes

Versions: 1

Compression:

Stored size: 194 Bytes

Contents

Spree::Taxon.class_eval do
  def brand_key
    words = name.split(' ')

    if words.count > 1
      words.map(&:chr).join.upcase
    else
      name.chars.first(3).join.upcase
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_ship_compliant-1.0.0 app/models/spree/taxon_decorator.rb