diff options
author | José Valim <jose.valim@gmail.com> | 2012-06-29 17:39:50 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-06-29 17:44:10 +0200 |
commit | 5e7d6bba79393de0279917f93b82f3b7b176f4b5 (patch) | |
tree | 1e9c6c8c183ba326efa33087d9b590c9196acec3 /actionpack/lib/action_dispatch/routing/mapper.rb | |
parent | 50b6110106a6e467f5e5f6303700522cebc60a9c (diff) | |
download | rails-5e7d6bba79393de0279917f93b82f3b7b176f4b5.tar.gz rails-5e7d6bba79393de0279917f93b82f3b7b176f4b5.tar.bz2 rails-5e7d6bba79393de0279917f93b82f3b7b176f4b5.zip |
Revert "Allow loading external route files from the router"
This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b.
Usage of this feature did not reveal any improvement in existing apps.
Conflicts:
actionpack/lib/action_dispatch/routing/mapper.rb
guides/source/routing.textile
railties/lib/rails/engine.rb
railties/lib/rails/paths.rb
railties/test/paths_test.rb
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 94242ad962..53a4afecb3 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1316,22 +1316,6 @@ module ActionDispatch parent_resource.instance_of?(Resource) && @scope[:shallow] end - def draw(name) - path = @draw_paths.find do |_path| - File.exists? "#{_path}/#{name}.rb" - end - - unless path - msg = "Your router tried to #draw the external file #{name}.rb,\n" \ - "but the file was not found in:\n\n" - msg += @draw_paths.map { |_path| " * #{_path}" }.join("\n") - raise ArgumentError, msg - end - - route_path = "#{path}/#{name}.rb" - instance_eval(File.read(route_path), route_path.to_s) - end - # match 'path' => 'controller#action' # match 'path', to: 'controller#action' # match 'path', 'otherpath', on: :member, via: :get @@ -1581,7 +1565,6 @@ module ActionDispatch def initialize(set) #:nodoc: @set = set - @draw_paths = set.draw_paths @scope = { :path_names => @set.resources_path_names } end |