diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-29 11:59:39 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-12-29 14:38:01 -0800 |
commit | cd97d0b5b73d12a8a6c4d202782d8542a3738e3b (patch) | |
tree | 810be4649eb806bedcbc43203288054e7058beb5 /actionpack | |
parent | fb3e09a877f6b4649dff8c9fc4a991a3ac7fa3cf (diff) | |
download | rails-cd97d0b5b73d12a8a6c4d202782d8542a3738e3b.tar.gz rails-cd97d0b5b73d12a8a6c4d202782d8542a3738e3b.tar.bz2 rails-cd97d0b5b73d12a8a6c4d202782d8542a3738e3b.zip |
we know the classes will be a list, so *tell* it to respond to each
rather than casting
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |