mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
20 lines
298 B
Ruby
20 lines
298 B
Ruby
# 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
|