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 CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.0.11 2010-05-10
2
+
3
+ * Ensure authenticity token is initialized properly.
4
+
1
5
  == 0.0.10 2010-05-05
2
6
 
3
7
  * Fix padding comment.
@@ -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
@@ -1,5 +1,5 @@
1
1
  module TemplateStreaming
2
- VERSION = [0, 0, 10]
2
+ VERSION = [0, 0, 11]
3
3
 
4
4
  class << VERSION
5
5
  include Comparable
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 10
9
- version: 0.0.10
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-05 00:00:00 -04:00
17
+ date: 2010-05-10 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency