Created
February 15, 2012 14:57
-
-
Save beanieboi/1836381 to your computer and use it in GitHub Desktop.
Rails Metal DataStreaming broken?!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api::V1::OpenRateController < ActionController::Metal | |
include ActionController::DataStreaming | |
def show | |
tracking_gif = "GIF89a\x03\x00\x02\x00\x80\x00\x00\xC0\xC0\xC0\x00\x00\x00!\xF9\x04\x01\x00\x00\x00\x00,\x00\x00\x00\x00\x03\x00\x02\x00\x00\x02\x02\x84_\x00;".freeze | |
send_data tracking_gif | |
end | |
end |
i also meet this error , rails version is 3.2.2
do u have solved?
haven't solved this, i'm using a ActionController::Base now
Including include ActionController::RackDelegation
solves this.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
undefined method `sending_file=' for nil:NilClass
Trace
actionpack (3.2.1) lib/action_controller/metal/data_streaming.rb:146:in
send_file_headers!' actionpack (3.2.1) lib/action_controller/metal/data_streaming.rb:111:in
send_data'app/controllers/api/v1/open_rate_controller.rb:9:in
show' actionpack (3.2.1) lib/abstract_controller/base.rb:167:in
process_action'actionpack (3.2.1) lib/action_controller/metal/rendering.rb:10:in
process_action' actionpack (3.2.1) lib/abstract_controller/base.rb:121:in
process'actionpack (3.2.1) lib/abstract_controller/rendering.rb:45:in
process' actionpack (3.2.1) lib/action_controller/metal.rb:203:in
dispatch'actionpack (3.2.1) lib/action_controller/metal.rb:246:in
block in action' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in
call'actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:66:in
dispatch' actionpack (3.2.1) lib/action_dispatch/routing/route_set.rb:30:in
call'journey (1.0.1) lib/journey/router.rb:68:in
block in call' journey (1.0.1) lib/journey/router.rb:56:in
each'journey (1.0.1) lib/journey/router.rb:56:in `call'