diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index ee61d421b0..c60e26983d 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -124,9 +124,8 @@ module ActionDispatch end def install(destinations = [ActionController::Base, ActionView::Base]) - destinations.each do |dest| - dest.__send__(:include, @module) - end + helper = @module + destinations.each { |d| d.module_eval { include helper } } end private