lib/trestle/form/renderer.rb in trestle-0.9.5 vs lib/trestle/form/renderer.rb in trestle-0.9.6

- old
+ new

@@ -2,10 +2,13 @@ require "action_view/helpers" module Trestle class Form class Renderer + def self.ruby2_keywords(*) + end unless respond_to?(:ruby2_keywords, true) + include ::ActionView::Context include ::ActionView::Helpers::CaptureHelper # Include hook helpers directly so that they are evaluated in the context of the renderer instead of the template. include Hook::Helpers @@ -38,10 +41,10 @@ end concat(result) end - def method_missing(name, *args, &block) + ruby2_keywords def method_missing(name, *args, &block) target = @form.respond_to?(name) ? @form : @template if block_given? && !RAW_BLOCK_HELPERS.include?(name) result = target.send(name, *args) do |*blockargs| render_form(*blockargs, &block)