aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorJiri Pospisil <mekishizufu@gmail.com>2012-12-31 17:46:19 +0100
committerJiri Pospisil <mekishizufu@gmail.com>2012-12-31 17:46:19 +0100
commitdbacb95a2187e853c0615f30919a407744162595 (patch)
tree016784d9adcdeb389d0cde881bb28fe15fe71f05 /actionpack/lib/action_dispatch/routing/mapper.rb
parent5e5107430bccc0a536e0b264c951793d8fe62235 (diff)
downloadrails-dbacb95a2187e853c0615f30919a407744162595.tar.gz
rails-dbacb95a2187e853c0615f30919a407744162595.tar.bz2
rails-dbacb95a2187e853c0615f30919a407744162595.zip
Fix usage of lambda as a Rack endpoint
The response body needs to respond_to? :each.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 3c99932e72..0dc6403ec0 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -315,7 +315,7 @@ module ActionDispatch
# A pattern can also point to a +Rack+ endpoint i.e. anything that
# responds to +call+:
#
- # match 'photos/:id', to: lambda {|hash| [200, {}, "Coming soon"] }
+ # match 'photos/:id', to: lambda {|hash| [200, {}, ["Coming soon"]] }
# match 'photos/:id', to: PhotoRackApp
# # Yes, controller actions are just rack endpoints
# match 'photos/:id', to: PhotosController.action(:show)
@@ -360,7 +360,7 @@ module ActionDispatch
# +call+ or a string representing a controller's action.
#
# match 'path', to: 'controller#action'
- # match 'path', to: lambda { |env| [200, {}, "Success!"] }
+ # match 'path', to: lambda { |env| [200, {}, ["Success!"]] }
# match 'path', to: RackApp
#
# [:on]