lib/action_view/component/base.rb in actionview-component-1.8.0 vs lib/action_view/component/base.rb in actionview-component-1.8.1
- old
+ new
@@ -46,17 +46,17 @@
@lookup_context ||= view_context.lookup_context
@view_flow ||= view_context.view_flow
@virtual_path ||= virtual_path
@variant = @lookup_context.variants.first
- return "" unless render?
-
old_current_template = @current_template
@current_template = self
@content = view_context.capture(self, &block) if block_given?
validate!
+
+ return "" unless render?
send(self.class.call_method_name(@variant))
ensure
@current_template = old_current_template
end