aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/uploaded_file.rb
diff options
context:
space:
mode:
authorlholden <lholden@yellowpages.com>2009-01-21 16:17:24 -0800
committerlholden <lholden@yellowpages.com>2009-01-21 16:17:24 -0800
commit19f8bb2808316dfca1f009538c3505ba144f614b (patch)
tree1ab9e925e83b988ed2a1858aa19236e2bcd79a60 /actionpack/lib/action_controller/uploaded_file.rb
parentb8fadd708b9850a77e1f64038763fffcff502499 (diff)
parent73cc5f270a5c2a2eab76c6c02615fec608822494 (diff)
downloadrails-19f8bb2808316dfca1f009538c3505ba144f614b.tar.gz
rails-19f8bb2808316dfca1f009538c3505ba144f614b.tar.bz2
rails-19f8bb2808316dfca1f009538c3505ba144f614b.zip
Merge branch 'master' of git://github.com/rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/uploaded_file.rb')
-rw-r--r--actionpack/lib/action_controller/uploaded_file.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/uploaded_file.rb b/actionpack/lib/action_controller/uploaded_file.rb
index ea4845c68f..376ba3621a 100644
--- a/actionpack/lib/action_controller/uploaded_file.rb
+++ b/actionpack/lib/action_controller/uploaded_file.rb
@@ -7,6 +7,13 @@ module ActionController
end
end
+ def self.extended(object)
+ object.class_eval do
+ attr_accessor :original_path, :content_type
+ alias_method :local_path, :path
+ end
+ end
+
# Take the basename of the upload's original filename.
# This handles the full Windows paths given by Internet Explorer
# (and perhaps other broken user agents) without affecting