From 6f3ac42550ed6780427e723de61f351537d582bf Mon Sep 17 00:00:00 2001 From: rspeicher Date: Wed, 15 Sep 2010 19:19:48 -0400 Subject: Typos --- actionpack/lib/action_view/helpers/form_helper.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/lib/action_view/helpers/form_helper.rb') diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 79a9d997dd..700a5a0ef1 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -211,7 +211,7 @@ module ActionView # If you have an object that needs to be represented as a different # parameter, like a Client that acts as a Person: # - # <%= form_for(@post, :as => :client do |f| %> + # <%= form_for(@post, :as => :client) do |f| %> # ... # <% end %> # @@ -228,8 +228,8 @@ module ActionView # ... # <% end %> # - # Where +@document = Document.find(params[:id])+ and - # +@comment = Comment.new+. + # Where @document = Document.find(params[:id]) and + # @comment = Comment.new. # # === Unobtrusive JavaScript # -- cgit v1.2.3 From b39dfd5936ef25b04d6caad3ceb048c68a79ea12 Mon Sep 17 00:00:00 2001 From: Joost Baaij Date: Tue, 21 Sep 2010 15:11:04 +0200 Subject: Document form_for behaviour when using file_field inside the block --- actionpack/lib/action_view/helpers/form_helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/form_helper.rb') diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index 700a5a0ef1..3cc412de63 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -668,11 +668,13 @@ module ActionView InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("hidden", options) end - # Returns an file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object + # Returns a file upload input tag tailored for accessing a specified attribute (identified by +method+) on an object # assigned to the template (identified by +object+). Additional options on the input tag can be passed as a # hash with +options+. These options will be tagged onto the HTML as an HTML element attribute as in the example # shown. # + # Using this method inside a +form_for+ block will set the enclosing form's encoding to multipart/form-data. + # # ==== Examples # file_field(:user, :avatar) # # => -- cgit v1.2.3