lib/action_controller/metal/streaming.rb in actionpack-3.1.12 vs lib/action_controller/metal/streaming.rb in actionpack-3.2.0.rc1
- old
+ new
@@ -198,36 +198,11 @@
#
module Streaming
extend ActiveSupport::Concern
include AbstractController::Rendering
- attr_internal :stream
- module ClassMethods
- # Render streaming templates. It accepts :only, :except, :if and :unless as options
- # to specify when to stream, as in ActionController filters.
- def stream(options={})
- ActiveSupport::Deprecation.warn "stream class method is deprecated. Please give the :stream option to render instead"
- if defined?(Fiber)
- before_filter :_stream_filter, options
- else
- raise "You cannot use streaming if Fiber is not available."
- end
- end
- end
-
protected
-
- # Mark following render calls as streaming.
- def _stream_filter #:nodoc:
- self.stream = true
- end
-
- # Consider the stream option when normalazing options.
- def _normalize_options(options) #:nodoc:
- super
- options[:stream] = self.stream unless options.key?(:stream)
- end
# Set proper cache control and transfer encoding when streaming
def _process_options(options) #:nodoc:
super
if options[:stream]