aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/test_case.rb
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-07-02 00:29:20 +0200
committerJosé Valim <jose.valim@gmail.com>2010-07-02 01:51:03 +0200
commitf7ba614c2db31933cbc12eda87518de3eca0228c (patch)
tree8aabbf6e719a3eff1eaec47988512eda3e8341b3 /actionpack/lib/action_view/test_case.rb
parentf8720a04d129668c7554c1a7270fba5418510b47 (diff)
downloadrails-f7ba614c2db31933cbc12eda87518de3eca0228c.tar.gz
rails-f7ba614c2db31933cbc12eda87518de3eca0228c.tar.bz2
rails-f7ba614c2db31933cbc12eda87518de3eca0228c.zip
Unify routes naming by renaming router to routes
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'actionpack/lib/action_view/test_case.rb')
-rw-r--r--actionpack/lib/action_view/test_case.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb
index e5614c9e3b..56aebca957 100644
--- a/actionpack/lib/action_view/test_case.rb
+++ b/actionpack/lib/action_view/test_case.rb
@@ -151,7 +151,7 @@ module ActionView
@view ||= begin
view = ActionView::Base.new(ActionController::Base.view_paths, {}, @controller)
view.singleton_class.send :include, _helpers
- view.singleton_class.send :include, @controller._router.url_helpers
+ view.singleton_class.send :include, @controller._routes.url_helpers
view.singleton_class.send :delegate, :alert, :notice, :to => "request.flash"
view.extend(Locals)
view.locals = self.locals
@@ -192,13 +192,13 @@ module ActionView
end
end
- def _router
- @controller._router if @controller.respond_to?(:_router)
+ def _routes
+ @controller._routes if @controller.respond_to?(:_routes)
end
def method_missing(selector, *args)
- if @controller.respond_to?(:_router) &&
- @controller._router.named_routes.helpers.include?(selector)
+ if @controller.respond_to?(:_routes) &&
+ @controller._routes.named_routes.helpers.include?(selector)
@controller.__send__(selector, *args)
else
super