openfoodfoundation/openfoodnetwork

View on GitHub
lib/spree/i18n/base.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Spree
  module ViewContext
    def self.context=(context)
      @context = context
    end

    def self.context
      @context
    end

    def view_context
      super.tap do |context|
        Spree::ViewContext.context = context
      end
    end
  end
end