Permalink
Browse files

Merge branch 'master' into erbout

  • Loading branch information...
2 parents 011825e + 5b53a06 commit fb9bf119fe700d25cf28502fd56a8b38f5806b47 @jeremy jeremy committed Jun 7, 2008
@@ -189,6 +189,8 @@ def each(&callback)
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
@@ -249,7 +249,7 @@ def interpolation_chunk(value_code = "#{local_name}")
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

0 comments on commit fb9bf11

Please sign in to comment.