template_streaming 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.6 2010-04-28
2
+
3
+ * Fix #render_to_string.
4
+
1
5
  == 0.0.5 2010-04-27
2
6
 
3
7
  * Automatically add Rack::Chunked to middleware stack.
@@ -1,5 +1,5 @@
1
1
  module TemplateStreaming
2
- VERSION = [0, 0, 5]
2
+ VERSION = [0, 0, 6]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
@@ -15,6 +15,7 @@ module TemplateStreaming
15
15
  def self.included(base)
16
16
  base.class_eval do
17
17
  alias_method_chain :render, :template_streaming
18
+ alias_method_chain :render_to_string, :template_streaming
18
19
  helper_method :flush, :push
19
20
 
20
21
  include ActiveSupport::Callbacks
@@ -56,6 +57,16 @@ module TemplateStreaming
56
57
  end
57
58
  end
58
59
 
60
+ # Override to ensure calling render_to_string from a helper
61
+ # doesn't trigger template streaming.
62
+ def render_to_string_with_template_streaming(*args, &block) # :nodoc
63
+ # Ensure renders within a render_to_string aren't considered
64
+ # top-level.
65
+ with_template_streaming_condition do
66
+ render_to_string_without_template_streaming(*args, &block)
67
+ end
68
+ end
69
+
59
70
  #
60
71
  # Flush the current template's output buffer out to the client
61
72
  # immediately.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 5
9
- version: 0.0.5
8
+ - 6
9
+ version: 0.0.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - George Ogata
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-27 00:00:00 -04:00
17
+ date: 2010-04-28 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency