I have an application with many tiers, where each tier has its own liquid template.
Now I am trying to implement a filter that given an asset name returns its url, like the asset_url
in shopify.
module UrlFilters
def asset_url(input)
current_tier.find_asset_by_name(input).url
end
# [...]
end
What is the simplest pattern to use to pass the current_tier
variable to the filter each time it is called?
Use Context registers hash.