template_streaming 0.0.10 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -0
- data/lib/template_streaming.rb +27 -0
- data/lib/template_streaming/version.rb +1 -1
- metadata +3 -3
data/CHANGELOG
CHANGED
data/lib/template_streaming.rb
CHANGED
@@ -6,10 +6,36 @@ module TemplateStreaming
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
+
#
|
10
|
+
# If true, always reference the flash before returning from the
|
11
|
+
# action when rendering progressively.
|
12
|
+
#
|
13
|
+
# This is required for the flash to work with progressive
|
14
|
+
# rendering, but unlike standard Rails behavior, will cause the
|
15
|
+
# flash to be swept even if it's never referenced in the
|
16
|
+
# views. This usually isn't an issue, as flash messages are
|
17
|
+
# typically rendered in the layout, causing a reference anyway.
|
18
|
+
#
|
19
|
+
# Default: true.
|
20
|
+
#
|
9
21
|
attr_accessor :autosweep_flash
|
22
|
+
|
23
|
+
#
|
24
|
+
# If true, always set the authenticity token before returning from
|
25
|
+
# the action when rendering progressively.
|
26
|
+
#
|
27
|
+
# This is required for the authenticity token to work with
|
28
|
+
# progressive rendering, but unlike standard Rails behavior, will
|
29
|
+
# cause the token to be set (and thus the session updated) even if
|
30
|
+
# it's never referenced in views.
|
31
|
+
#
|
32
|
+
# Default: true.
|
33
|
+
#
|
34
|
+
attr_accessor :set_authenticity_token
|
10
35
|
end
|
11
36
|
|
12
37
|
self.autosweep_flash = true
|
38
|
+
self.set_authenticity_token = true
|
13
39
|
|
14
40
|
module Controller
|
15
41
|
def self.included(base)
|
@@ -37,6 +63,7 @@ module TemplateStreaming
|
|
37
63
|
response.body = @streaming_body
|
38
64
|
response.prepare!
|
39
65
|
flash if TemplateStreaming.autosweep_flash
|
66
|
+
form_authenticity_token if TemplateStreaming.set_authenticity_token
|
40
67
|
run_callbacks :when_streaming_template
|
41
68
|
|
42
69
|
# Normally, @_flash is removed after #perform_action, which
|
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
|
+
- 11
|
9
|
+
version: 0.0.11
|
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-05-
|
17
|
+
date: 2010-05-10 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|