From cd97d0b5b73d12a8a6c4d202782d8542a3738e3b Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Thu, 29 Dec 2011 11:59:39 -0800 Subject: we know the classes will be a list, so *tell* it to respond to each rather than casting --- actionpack/lib/action_dispatch/routing/route_set.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 22d4ccf623..ee61d421b0 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -124,7 +124,7 @@ module ActionDispatch end def install(destinations = [ActionController::Base, ActionView::Base]) - Array(destinations).each do |dest| + destinations.each do |dest| dest.__send__(:include, @module) end end @@ -278,7 +278,7 @@ module ActionDispatch end def install_helpers(destinations = [ActionController::Base, ActionView::Base]) - Array(destinations).each { |d| d.module_eval { include Helpers } } + destinations.each { |d| d.module_eval { include Helpers } } named_routes.install(destinations) end @@ -324,7 +324,7 @@ module ActionDispatch # we can include? # Yes plz - JP included do - routes.install_helpers(self) + routes.install_helpers([self]) singleton_class.send(:redefine_method, :_routes) { routes } end -- cgit v1.2.3