Sha256: 48bd33aac0ccf1dcc2514b512e1d1eaea368c07330ed59a264cb45fab5aa6019

Contents?: true

Size: 481 Bytes

Versions: 49

Compression:

Stored size: 481 Bytes

Contents

module Spree
  # Methods added to this helper will be available to all templates in the
  # frontend.
  module StoreHelper
    # @return [Boolean] true when it is appropriate to show the store menu
    def store_menu?
      %w{thank_you}.exclude? params[:action]
    end

    def cache_key_for_taxons
      max_updated_at = @taxons.maximum(:updated_at).to_i
      parts = [@taxon.try(:id), max_updated_at].compact.join("-")
      "#{I18n.locale}/taxons/#{parts}"
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
solidus_core-2.1.1 app/helpers/spree/store_helper.rb
solidus_core-2.0.3 app/helpers/spree/store_helper.rb
solidus_core-1.4.2 app/helpers/spree/store_helper.rb
solidus_core-1.3.2 app/helpers/spree/store_helper.rb
solidus_core-1.2.3 app/helpers/spree/store_helper.rb
solidus_core-1.1.4 app/helpers/spree/store_helper.rb
solidus_core-1.0.7 app/helpers/spree/store_helper.rb
solidus_core-2.0.2 app/helpers/spree/store_helper.rb
solidus_core-1.4.1 app/helpers/spree/store_helper.rb
solidus_core-2.1.0 app/helpers/spree/store_helper.rb
solidus_core-2.1.0.rc1 app/helpers/spree/store_helper.rb
solidus_core-2.0.1 app/helpers/spree/store_helper.rb
solidus_core-2.1.0.beta1 app/helpers/spree/store_helper.rb
solidus_core-2.0.0 app/helpers/spree/store_helper.rb
solidus_core-1.4.0 app/helpers/spree/store_helper.rb
solidus_core-2.0.0.rc1 app/helpers/spree/store_helper.rb
solidus_core-1.4.0.rc1 app/helpers/spree/store_helper.rb
solidus_core-2.0.0.beta1 app/helpers/spree/store_helper.rb
solidus_core-1.4.0.beta1 app/helpers/spree/store_helper.rb
solidus_core-1.3.1 app/helpers/spree/store_helper.rb