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 +4 -0
- data/lib/template_streaming/version.rb +1 -1
- data/lib/template_streaming.rb +11 -0
- metadata +3 -3
data/CHANGELOG
CHANGED
data/lib/template_streaming.rb
CHANGED
@@ -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
|
-
-
|
9
|
-
version: 0.0.
|
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-
|
17
|
+
date: 2010-04-28 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|