diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-06 22:27:03 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-06-06 22:27:03 -0700 |
commit | fb9bf119fe700d25cf28502fd56a8b38f5806b47 (patch) | |
tree | 6ed9935c359c82eb96f2d9a23a04b4192b19c03f /actionpack/lib | |
parent | 011825e15a4e71bad1778c7008eb499ff97e98e1 (diff) | |
parent | 5b53a0695904afb6a576fe5a9badbf14261909b5 (diff) | |
download | rails-fb9bf119fe700d25cf28502fd56a8b38f5806b47.tar.gz rails-fb9bf119fe700d25cf28502fd56a8b38f5806b47.tar.bz2 rails-fb9bf119fe700d25cf28502fd56a8b38f5806b47.zip |
Merge branch 'master' into erbout
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/rack_process.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/routing/segments.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/rack_process.rb b/actionpack/lib/action_controller/rack_process.rb index 37b56dabca..9b4aa9b7cf 100644 --- a/actionpack/lib/action_controller/rack_process.rb +++ b/actionpack/lib/action_controller/rack_process.rb @@ -189,6 +189,8 @@ end_msg if @body.respond_to?(:call) @writer = lambda { |x| callback.call(x) } @body.call(self, self) + elsif @body.is_a?(String) + @body.each_line(&callback) else @body.each(&callback) end diff --git a/actionpack/lib/action_controller/routing/segments.rb b/actionpack/lib/action_controller/routing/segments.rb index 864e068004..f0ad066bad 100644 --- a/actionpack/lib/action_controller/routing/segments.rb +++ b/actionpack/lib/action_controller/routing/segments.rb @@ -249,7 +249,7 @@ module ActionController end def extract_value - "#{local_name} = hash[:#{key}] && hash[:#{key}].collect { |path_component| URI.escape(path_component.to_param, ActionController::Routing::Segment::UNSAFE_PCHAR) }.to_param #{"|| #{default.inspect}" if default}" + "#{local_name} = hash[:#{key}] && Array(hash[:#{key}]).collect { |path_component| URI.escape(path_component.to_param, ActionController::Routing::Segment::UNSAFE_PCHAR) }.to_param #{"|| #{default.inspect}" if default}" end def default |