diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index ee61d421b080e4195e2c281b8f85af1fc481250c..c60e26983d1b4102591ba2fd3c1cd6e503648720 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -124,9 +124,8 @@ def length 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