diff options
author | José Valim <jose.valim@gmail.com> | 2012-05-25 09:27:39 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-05-25 09:27:39 +0200 |
commit | 73db73fee931e087317261fe9373228b5c0f1ed1 (patch) | |
tree | 9c10cd275668dc5470d51c6133c9e973ba6be5e1 /actionpack/lib/action_dispatch/routing/mapper.rb | |
parent | ec8c4b5a833526c7f1f9d5d1f3fd566cf386f47e (diff) | |
download | rails-73db73fee931e087317261fe9373228b5c0f1ed1.tar.gz rails-73db73fee931e087317261fe9373228b5c0f1ed1.tar.bz2 rails-73db73fee931e087317261fe9373228b5c0f1ed1.zip |
Remove implicit dependency on pathname
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 67a208263b..e43e897783 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1318,7 +1318,7 @@ module ActionDispatch def draw(name) path = @draw_paths.find do |_path| - _path.join("#{name}.rb").file? + File.exists? "#{_path}/#{name}.rb" end unless path @@ -1328,8 +1328,8 @@ module ActionDispatch raise ArgumentError, msg end - route_path = path.join("#{name}.rb") - instance_eval(route_path.read, route_path.to_s) + route_path = "#{path}/#{name}.rb" + instance_eval(File.read(route_path), route_path.to_s) end # match 'path' => 'controller#action' |