Module: Jb::BaseToSCanceller

Defined in:
lib/jb/action_view_monkeys.rb

Overview

Rails 7.1+: A monkey-patch not to stringify rendered object from JB templates

Instance Method Summary collapse

Instance Method Details

#_run(method, template) ⇒ Object



18
19
20
21
22
23
24
25
26
# File 'lib/jb/action_view_monkeys.rb', line 18

def _run(method, template, *, **)
  val = super
  if template.respond_to?(:handler) && (template.handler == Jb::Handler)
    def val.to_s
      self
    end
  end
  val
end