Sha256: 4aa016ede187c124ac5070b0b991a5aeb2b09947bf89655a77caca6e256f1555

Contents?: true

Size: 369 Bytes

Versions: 34

Compression:

Stored size: 369 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # Helper overrides for the ActionView::Helpers::CacheHelper in order to take
  # locale into account for fragment caching.
  module CacheHelper
    # See: https://git.io/J3ouj
    def cache(name = {}, options = {}, &block)
      name = Array(name) + [current_locale]

      super(name, options, &block)
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
decidim-core-0.26.1 app/helpers/decidim/cache_helper.rb
decidim-core-0.26.0 app/helpers/decidim/cache_helper.rb
decidim-core-0.26.0.rc2 app/helpers/decidim/cache_helper.rb
decidim-core-0.26.0.rc1 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.2 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.1 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.0 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.0.rc4 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.0.rc3 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.0.rc2 app/helpers/decidim/cache_helper.rb
decidim-core-0.25.0.rc1 app/helpers/decidim/cache_helper.rb
decidim-core-0.24.3 app/helpers/decidim/cache_helper.rb
decidim-core-0.23.6 app/helpers/decidim/cache_helper.rb
decidim-core-0.24.2 app/helpers/decidim/cache_helper.rb