diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-10 05:54:46 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-12-10 05:54:46 +0000 |
commit | b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d (patch) | |
tree | affedc3593d216a6b5c4d1c27f84a0b3c7b19e46 /actionpack/lib/action_controller | |
parent | c81fff2468bbf597457bf57cd599d2d4be77c715 (diff) | |
download | rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.tar.gz rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.tar.bz2 rails-b1ce7e4d4ada3eedc361d90b637ca06274a0ac3d.zip |
Ruby 1.9 compat: File.exists\? -> File.exist\? en masse. References #1689 [Pratik Naik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8365 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/caching.rb | 4 | ||||
-rw-r--r-- | actionpack/lib/action_controller/rescue.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/caching.rb b/actionpack/lib/action_controller/caching.rb index bf4e7799c7..e3e48f660b 100644 --- a/actionpack/lib/action_controller/caching.rb +++ b/actionpack/lib/action_controller/caching.rb @@ -81,7 +81,7 @@ module ActionController #:nodoc: return unless perform_caching benchmark "Expired page: #{page_cache_file(path)}" do - File.delete(page_cache_path(path)) if File.exists?(page_cache_path(path)) + File.delete(page_cache_path(path)) if File.exist?(page_cache_path(path)) end end @@ -552,7 +552,7 @@ module ActionController #:nodoc: end def ensure_cache_path(path) - FileUtils.makedirs(path) unless File.exists?(path) + FileUtils.makedirs(path) unless File.exist?(path) end def search_dir(dir, &callback) diff --git a/actionpack/lib/action_controller/rescue.rb b/actionpack/lib/action_controller/rescue.rb index 46611b7c00..b91115a93c 100644 --- a/actionpack/lib/action_controller/rescue.rb +++ b/actionpack/lib/action_controller/rescue.rb @@ -154,7 +154,7 @@ module ActionController #:nodoc: def render_optional_error_file(status_code) status = interpret_status(status_code) path = "#{RAILS_ROOT}/public/#{status[0,3]}.html" - if File.exists?(path) + if File.exist?(path) render :file => path, :status => status else head status |