Skip to content

Commit

Permalink
Merge branch 'master' into erbout
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Jun 7, 2008
2 parents 011825e + 5b53a06 commit fb9bf11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions actionpack/lib/action_controller/rack_process.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ def each(&callback)
if @body.respond_to?(:call) if @body.respond_to?(:call)
@writer = lambda { |x| callback.call(x) } @writer = lambda { |x| callback.call(x) }
@body.call(self, self) @body.call(self, self)
elsif @body.is_a?(String)
@body.each_line(&callback)
else else
@body.each(&callback) @body.each(&callback)
end end
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/routing/segments.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def interpolation_chunk(value_code = "#{local_name}")
end end


def extract_value 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 end


def default def default
Expand Down

0 comments on commit fb9bf11

Please sign in to comment.