Browse files

Ensure we have an array to collect

  • Loading branch information...
1 parent 6775cac commit 78a0ccae88f73e868c392f7e8f22b51abab2c1d1 @jeremy jeremy committed Jun 6, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/routing/segments.rb
View
2 actionpack/lib/action_controller/routing/segments.rb
@@ -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 78a0cca

Please sign in to comment.