From e2b23374aa0f8fee5d9c84c4dbb6bc6aa597e73a Mon Sep 17 00:00:00 2001 From: Sam Elliott and Ryan Bigg and Santiago Pastorino Date: Sun, 17 Jan 2010 09:50:41 +1000 Subject: [PATCH] If the entities is an Array, we should use join, because on 1.9 Array#to_s prints out a pretty array, rather than the standard conglomerate known in 1.8.* --- actionpack/lib/action_dispatch/routing/mapper.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 9aaa435..43641b9 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -354,7 +354,7 @@ module ActionDispatch attr_reader :plural, :singular, :options def initialize(entities, options = {}) - entities = entities.to_s + entities = entities.is_a?(Array) ? entities.join : entities.to_s @options = options @plural = entities.pluralize -- 1.6.4.1