lib/draper/view_context/build_strategy.rb in draper-3.1.0 vs lib/draper/view_context/build_strategy.rb in draper-4.0.0
- old
+ new
@@ -10,10 +10,10 @@
def initialize(&block)
@view_context_class = Class.new(ActionView::Base, &block)
end
def call
- view_context_class.new
+ view_context_class.respond_to?(:empty) ? view_context_class.empty : view_context_class.new
end
private
attr_reader :view_context_class