lib/draper/helper_proxy.rb in draper-1.4.0 vs lib/draper/helper_proxy.rb in draper-2.0.0
- old
+ new
@@ -14,9 +14,15 @@
def method_missing(method, *args, &block)
self.class.define_proxy method
send(method, *args, &block)
end
+ # Checks if the context responds to an instance method, or is able to
+ # proxy it to the view context.
+ def respond_to_missing?(method, include_private = false)
+ super || view_context.respond_to?(method)
+ end
+
delegate :capture, to: :view_context
protected
attr_reader :view_context