Permalink
Browse files

Rename when_streaming_template hook to when_rendering_progressively.

Moving towards a single, consistent term for this.
  • Loading branch information...
1 parent 995bba8 commit 5ca56a2c5868e34b3ee878e5132c63416b7e7eba @oggy committed Apr 17, 2011
Showing with 5 additions and 5 deletions.
  1. +2 −2 lib/template_streaming.rb
  2. +1 −1 lib/template_streaming/error_recovery.rb
  3. +2 −2 spec/template_streaming_spec.rb
@@ -19,7 +19,7 @@ def self.included(base)
helper_method :flush, :push
include ActiveSupport::Callbacks
- define_callbacks :when_streaming_template
+ define_callbacks :when_rendering_progressively
end
end
@@ -76,7 +76,7 @@ def render_with_template_streaming(*args, &block)
@template_streaming_flash = @_flash
request.env[PROGRESSIVE_KEY] = true
- run_callbacks :when_streaming_template
+ run_callbacks :when_rendering_progressively
else
render_without_template_streaming(*args, &block)
end
@@ -132,7 +132,7 @@ def render_exceptions(exceptions)
module Controller
def self.included(base)
- base.when_streaming_template :set_template_streaming_controller
+ base.when_rendering_progressively :set_template_streaming_controller
base.class_inheritable_accessor :progressive_rendering_error_callbacks
base.class_inheritable_accessor :progressive_rendering_error_renderer
base.progressive_rendering_error_callbacks = []
@@ -559,9 +559,9 @@
end
end
- describe "#when_streaming_template" do
+ describe "#when_rendering_progressively" do
before do
- TestController.when_streaming_template { |c| c.data.order << :callback }
+ TestController.when_rendering_progressively { |c| c.data.order << :callback }
view "<% data.order << :rendering %>"
layout '<%= yield %>'
data.order = []

0 comments on commit 5ca56a2

Please sign in to comment.