Permalink
Browse files

Merge pull request #16533 from lucasmazza/lm-named-routes-helper

Deprecate NamedRouteCollection#helpers.
  • Loading branch information...
rafaelfranca committed Aug 18, 2014
2 parents 7ee0550 + 9ee64f0 commit 37a298db394274a94cc4b27bfbae85ae0cc6b0c6
Showing with 5 additions and 0 deletions.
  1. +5 −0 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -101,6 +101,11 @@ def route_defined?(name)
@path_helpers.include?(key) || @url_helpers.include?(key)
end
+ def helpers
+ ActiveSupport::Deprecation.warn("`named_routes.helpers` is deprecated, please use `route_defined?(route_name)` to see if a named route was defined.")
+ @path_helpers + @url_helpers
+ end
+
def helper_names
@path_helpers.map(&:to_s) + @url_helpers.map(&:to_s)
end

0 comments on commit 37a298d

Please sign in to comment.