Skip to content
Browse files

Rack responses should always respond to each.

Strings in Ruby 1.9 do not respond to each, instead it is recommended
to use an array. This fixes issue of 500 error when including with
rails and trying to go to /flipper.
  • Loading branch information...
1 parent c30f224 commit 5051f3311875ccd862e253ea576e1ef0dde565d7 @jnunemaker committed Feb 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/flipper/ui/action.rb
4 lib/flipper/ui/action.rb
@@ -99,7 +99,7 @@ def halt(response)
def view_response(name)
header 'Content-Type', 'text/html'
body = view_with_layout { view_without_layout name }
- [@code, @headers, body]
+ [@code, @headers, [body]]
# Public: Dumps an object as json and returns rack response with that as
@@ -111,7 +111,7 @@ def view_response(name)
def json_response(object)
header 'Content-Type', 'application/json'
body = MultiJson.dump(object)
- [@code, @headers, body]
+ [@code, @headers, [body]]
# Public: Set the status code for the response.

0 comments on commit 5051f33

Please sign in to comment.
Something went wrong with that request. Please try again.