diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-11 08:39:23 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-09-11 08:39:23 +0000 |
commit | a15068726f4f63fbdf830da2be8560f1b99f5d9d (patch) | |
tree | 4a07c7ea385ee223579ed49c5c1c5dda4cccef70 /actionpack/lib/action_view | |
parent | 8ae68efcf84d9c9927c4db7dfeb0f41693b9e555 (diff) | |
download | rails-a15068726f4f63fbdf830da2be8560f1b99f5d9d.tar.gz rails-a15068726f4f63fbdf830da2be8560f1b99f5d9d.tar.bz2 rails-a15068726f4f63fbdf830da2be8560f1b99f5d9d.zip |
Added :multipart option to ActiveRecordHelper#form to make it possible to add file input fields #2034 [jstirk@oobleyboo.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2193 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/active_record_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/active_record_helper.rb b/actionpack/lib/action_view/helpers/active_record_helper.rb index a8e78873bb..41d63fbc9a 100644 --- a/actionpack/lib/action_view/helpers/active_record_helper.rb +++ b/actionpack/lib/action_view/helpers/active_record_helper.rb @@ -71,7 +71,7 @@ module ActionView yield contents if block_given? contents << submit_tag(submit_value) - content_tag('form', contents, :action => action, :method => 'post') + content_tag('form', contents, :action => action, :method => 'post', :enctype => options[:multipart] ? 'multipart/form-data': nil) end # Returns a string containing the error message attached to the +method+ on the +object+, if one exists. |