1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

be explicit about where helpers are installed

This commit is contained in:
Aaron Patterson 2011-12-29 17:27:10 -08:00
parent 116b9edf95
commit 5681f79f64
2 changed files with 2 additions and 2 deletions

View file

@ -276,7 +276,7 @@ module ActionDispatch
@prepend.each { |blk| eval_block(blk) }
end
def install_helpers(destinations = [ActionController::Base, ActionView::Base])
def install_helpers(destinations)
destinations.each { |d| d.module_eval { include Helpers } }
named_routes.install(destinations)
end

View file

@ -165,7 +165,7 @@ class ActionPackAssertionsControllerTest < ActionController::TestCase
match 'route_one', :to => 'action_pack_assertions#nothing', :as => :route_one
match ':controller/:action'
end
set.install_helpers
set.install_helpers([ActionController::Base, ActionView::Base])
process :redirect_to_named_route
assert_redirected_to 'http://test.host/route_one'