Permalink
Browse files

we know the classes will be a list, so *tell* it to respond to each

rather than casting
  • Loading branch information...
tenderlove committed Dec 29, 2011
1 parent fb3e09a commit cd97d0b5b73d12a8a6c4d202782d8542a3738e3b
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -124,7 +124,7 @@ def length
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 @@ def clear!
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 @@ def self.url_for(options)
# we can include?
# Yes plz - JP
included do
- routes.install_helpers(self)
+ routes.install_helpers([self])
singleton_class.send(:redefine_method, :_routes) { routes }
end

0 comments on commit cd97d0b

Please sign in to comment.