aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix explicit names on multiple file fieldsRyan McGeary2013-04-051-8/+7
| | | | | | | | If a file field tag is passed the multiple option, it is turned into an array field (appending "[]"), but if the file field is passed an explicit name as an option, leave the name alone (do not append "[]"). Fixes #9830
* Merge pull request #9616 from exviva/multiple_select_name_double_square_bracketsCarlos Antonio da Silva2013-03-091-1/+1
| | | | | | | | | | | | | | | | | | | Fix incorrectly appended square brackets to a multiple select box Before: select(:category, [], {}, {:multiple => true, :name => "post[category][]"}) # => <select name="post[category][][]" ...> After: select(:category, [], {}, {:multiple => true, :name => "post[category][]"}) # => <select name="post[category][]" ...> Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_view/helpers/tags/base.rb actionpack/test/template/form_options_helper_test.rb
* Do not call fields_for from form_for, to avoid instantiating two buildersCarlos Antonio da Silva2013-01-061-8/+6
| | | | | | Conflicts: actionpack/lib/action_view/helpers/form_helper.rb actionpack/test/template/form_helper_test.rb
* Merge pull request #8108 from Casecommons/fix-multiple-and-index-in-instance-tagRafael Mendonça França2012-11-081-1/+3
| | | | | | | Support :multiple option on input tags that also have :index Conflicts: actionpack/lib/action_view/helpers/tags/base.rb actionpack/lib/action_view/helpers/tags/collection_check_boxes.rb
* Lazy load `default_form_builder` if it's passed as a stringPiotr Sarnacki2012-04-281-1/+7
| | | | closes #3341
* Merge pull request #5622 from rafaelfranca/fix-2492-3-2Jeremy Kemper2012-03-271-2/+3
|\ | | | | [3-2-stable] Fix label_tag to merge the options hash with the object hash
| * Check if the options hash already exists and merge it with the anotherRafael Mendonça França2012-03-271-10/+5
| | | | | | | | | | | | hash. Closes #2492 and #5614
| * Fixing issue #2492. ActionView::Base.field_error_proc doesn't call for label.Andrey Samsonov2012-03-271-2/+8
| | | | | | | | | | | | objectify_options method should be applied to the proper options arg. See explanation and example of the bug - https://github.com/kryzhovnik/rails_field_error_proc_bug_example
* | Don't break Haml with textarea newline fix.James Coleman2012-03-271-1/+1
|/ | | | | | See issue #393, issue #4000, issue #5190, and issue #5191. Adds a newline after the textarea opening tag based on @codykrieger's original patch so that we don't cause regressions in Haml-using apps. The regression caused textarea tags to add newlines to the field unintentionally (each update/save added an extra newline.) Also fix 6 more tests that didn't yet have the newline expectation.
* Add a new line after the textarea opening tag.Rafael Mendonça França2012-02-271-1/+1
| | | | Closes #393
* don't set the hidden checkbox value if it's nilDamien Mathieu2012-01-271-1/+1
|
* check_box helper with :disabled => true generates disabled hidden field. ↵Tadas Tamošauskas2012-01-271-1/+1
| | | | fixes #1953
* fix adding field_with_errors to date selects, closes #3487Vasiliy Ermolovich2011-12-201-1/+2
|
* Add button_tag support to ActionView::Helpers::FormBuilder.Will Farrington2011-12-111-0/+33
| | | | | | | | | | This support is near-identical to the existing submit_tag support. Example: <%= form_for @post do |f| %> <%= f.button %> <% end %>
* form_for with +:as+ option uses "action_as" as css class and idVasiliy Ermolovich2011-12-041-2/+2
|
* minor typo fixVijay Dev2011-12-011-1/+1
|
* add namespace options to form_forVasiliy Ermolovich2011-11-271-2/+9
| | | | | You can provide a namespace for your form to ensure uniqueness of id attributes on form elements. The namespace attribute will be prefixed with underscore on the generate HTML id
* fix label with block in erblest2011-11-271-2/+2
|
* Fix impractical I18n lookup in nested fields_forAlexander Uvarov2011-11-171-1/+9
|
* Docs cosmetic fixes in Action View form_helper.rbAlexey Vakhov2011-11-061-2/+2
|
* Remove 'size' attribute from number_field form helper fixes #3454Waseem Ahmad2011-11-041-0/+2
| | | | | f.number_field generates <input type="number", size="30"../> which is invalid HTML5. See: http://dev.w3.org/html5/spec/Overview.html#number-state
* Rename new method to_path to to_partial_path to avoid conflicts with ↵José Valim2011-08-011-4/+4
| | | | File#to_path and similar.
* Rename class method to_path to _to_path and make it explicit that it is an ↵José Valim2011-07-281-2/+2
| | | | internal method.
* Merge pull request #2034 from Casecommons/to_pathJosé Valim2011-07-281-2/+6
|\ | | | | Allow ActiveModel-compatible instances to define their own partial paths
| * Let ActiveModel instances define partial paths.Grant Hutchins & Peter Jaros2011-07-251-2/+6
| | | | | | | | | | | | Deprecate ActiveModel::Name#partial_path. Now you should call #to_path directly on ActiveModel instances.
* | Merge pull request #2095 from dgeb/issue-2094Aaron Patterson2011-07-261-1/+1
|\ \ | |/ |/| Fixes overriding of options[:html][:remote] in form_for() (Issue #2094)
| * fixed problem in which options[:html][:remote] would be overridden in ↵Dan Gebhardt2011-07-151-1/+1
| | | | | | | | form_for() - fixes #2094
* | Missed a few instances of British English spelling in the last commitOemuer Oezkir2011-07-241-1/+1
| | | | | | | | oh and obviously I meant according to Webster, not Weber
* | Changed a few instances of of words in the API docs written in British ↵Oemuer Oezkir2011-07-241-2/+2
| | | | | | | | | | | | English to American English(according to Weber)
* | little details seen while doing a pass through what's new in docrailsXavier Noria2011-07-231-6/+6
| |
* | Update form helper documentation to match code.Paul Battley2011-07-191-2/+2
| | | | | | | | Change d3cfee11 removed the automatically generated object_name_submit id attributes on form submit elements. This makes the documentation match.
* | minor corrections in form helpers guide and api docsVijay Dev2011-07-201-2/+2
| |
* | examples for telephone_field, url_field and email_fieldRay Baxter2011-07-171-0/+12
| |
* | document options to search_fieldRay Baxter2011-07-171-1/+22
| |
* | use correct in descriptionRay Baxter2011-07-171-1/+1
|/
* Don't require ActionView::Context as it's autoloadedAndrew White2011-07-011-1/+0
|
* Add missing requires for ActionView::Context and Module#instance_method_namesAndrew White2011-07-011-0/+2
|
* Revert "Add method fields_for_with_index to FormHelper"José Valim2011-07-011-18/+6
| | | | | | | | This reverts commit 7c562d5e460d97b18e4f3367b3cfb13401732920. Conflicts: actionpack/lib/action_view/helpers/form_helper.rb
* Fixed ActionView::FormOptionsHelper#select with :multiple => falseBogdan Gusiev2011-06-301-1/+1
|
* Test for extractable_options? within nested fields_for.Sam Pohlenz2011-06-201-1/+1
| | | | | This fixes an error when a record object that is a subclass of Hash is passed to fields_for, which is incorrectly interpreted as field options.
* Typo.R.T. Lechow2011-06-161-2/+2
|
* form => form_forVijay Dev2011-06-151-1/+1
|
* Clarify importance of *_attributes= writer methods for nested fieldsChristine Yen2011-06-151-8/+12
|
* The example in the API docs incorrectly indicated that form_for would use ↵Mark Roghelia2011-05-311-2/+2
| | | | the same default route for both new and previously persisted records. The default path given in the example would have generated a routing error for new records. form_for actually uses polymorphic_path to determine which route to use based on the state of the record. The example has been updated to reflect the method's actual behavior.
* Edited actionpack/lib/action_view/helpers/form_helper.rb via GitHubJosé Valim2011-05-221-0/+1
|
* Add method fields_for_with_index to FormHelperJorge Bejar2011-05-211-0/+19
|
* Use record_name to make fields for methods more consistentCarlos Antonio da Silva2011-05-141-6/+6
|
* Refactor fields_for to make the api more clear, and fix usage with non ↵Carlos Antonio da Silva2011-05-141-26/+19
| | | | nested attributes and without object
* Cleanup instantiate builder method definitionCarlos Antonio da Silva2011-05-141-5/+2
|
* Remove dependency from _template.José Valim2011-05-011-1/+1
|