Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename when_streaming_template hook to when_rendering_progressively.

Moving towards a single, consistent term for this.
  • Loading branch information...
commit 5ca56a2c5868e34b3ee878e5132c63416b7e7eba 1 parent 995bba8
@oggy authored
View
4 lib/template_streaming.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
View
2  lib/template_streaming/error_recovery.rb
@@ -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 = []
View
4 spec/template_streaming_spec.rb
@@ -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 = []
Please sign in to comment.
Something went wrong with that request. Please try again.