diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-16 13:06:15 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-16 13:06:15 +0000 |
commit | 9a33b9a73745401c1c715ee65f7e30f029d3e6a7 (patch) | |
tree | ab60f27f905b891d97d14567caa541f7d8aeca86 /actionpack/lib | |
parent | bc4156e09e558260cc39a238ca4d17b44208ce2a (diff) | |
download | rails-9a33b9a73745401c1c715ee65f7e30f029d3e6a7.tar.gz rails-9a33b9a73745401c1c715ee65f7e30f029d3e6a7.tar.bz2 rails-9a33b9a73745401c1c715ee65f7e30f029d3e6a7.zip |
Added more informative error message for "file not found" situation in send_file #484 [Alexey]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@427 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 64dc79a24a..1662d59b81 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -441,7 +441,7 @@ module ActionController #:nodoc: # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9 # for the Cache-Control header spec. def send_file(path, options = {}) #:doc: - raise MissingFile, path unless File.file?(path) and File.readable?(path) + raise MissingFile, "Cannot read file #{path}" unless File.file?(path) and File.readable?(path) options[:length] ||= File.size(path) options[:filename] ||= File.basename(path) |