Sha256: 4c5230de04dc8e66515afa167ea0a16b0cf6ae3b9ecc457352fc1013b048ebdb
Contents?: true
Size: 606 Bytes
Versions: 19
Compression:
Stored size: 606 Bytes
Contents
# frozen_string_literal: true module Liquid class Tag module Disableable def render_to_output_buffer(context, output) if context.tag_disabled?(tag_name) output << disabled_error(context) return end super end def disabled_error(context) # raise then rescue the exception so that the Context#exception_renderer can re-raise it raise DisabledError, "#{tag_name} #{parse_context[:locale].t('errors.disabled.tag')}" rescue DisabledError => exc context.handle_error(exc, line_number) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems