aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-03 00:17:17 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-01-04 11:58:41 -0300
commit1f3b0a8609c00278b9a10076040ac9c90a9cc4a6 (patch)
treebdb35eb971f122150a392ac51a531719c8a80d8f /actionpack/lib/action_dispatch/routing
parent4b19d5b7bcdf4f11bd1e2e9ed2149a958e338c01 (diff)
downloadrails-1f3b0a8609c00278b9a10076040ac9c90a9cc4a6.tar.gz
rails-1f3b0a8609c00278b9a10076040ac9c90a9cc4a6.tar.bz2
rails-1f3b0a8609c00278b9a10076040ac9c90a9cc4a6.zip
Remove deprecated support to define routes with `:to` option that
doesn't contain `#`
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb19
1 files changed, 2 insertions, 17 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index b9e916078c..e793ef849e 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -8,7 +8,6 @@ require 'active_support/core_ext/string/filters'
require 'active_support/inflector'
require 'action_dispatch/routing/redirection'
require 'action_dispatch/routing/endpoint'
-require 'active_support/deprecation'
module ActionDispatch
module Routing
@@ -279,22 +278,8 @@ module ActionDispatch
end
def split_to(to)
- case to
- when Symbol
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Defining a route where `to` is a symbol is deprecated.
- Please change `to: :#{to}` to `action: :#{to}`.
- MSG
-
- [nil, to.to_s]
- when /#/ then to.split('#')
- when String
- ActiveSupport::Deprecation.warn(<<-MSG.squish)
- Defining a route where `to` is a controller without an action is deprecated.
- Please change `to: :#{to}` to `controller: :#{to}`.
- MSG
-
- [to, nil]
+ if to =~ /#/
+ to.split('#')
else
[]
end