Permalink
Browse files

add an option :_buffer to force bypassing auto-buffering

  • Loading branch information...
1 parent 5329b9b commit 3a3321c79c7d08ac4ce2fef3fe6dbd8ee8aba272 Sven Fuchs committed Jan 11, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/minimal/template.rb
View
@@ -44,7 +44,8 @@ def method_missing(method, *args, &block)
end
def call_view(method, *args, &block)
- view.send(method, *args, &block).tap { |result| self << result if auto_buffer?(method) }
+ buffer = args.last.delete(:_buffer) if args.last.is_a?(Hash)
+ view.send(method, *args, &block).tap { |result| self << result if !buffer.is_a?(FalseClass) && auto_buffer?(method) }
end
def auto_buffer?(method)

0 comments on commit 3a3321c

Please sign in to comment.