aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* remove size attribute from tag generated by file_field helper [#5084 ↵Miles Egan2010-07-131-0/+5
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename _snowman_ to _snowman to be in sync with _method and _csrf_token.José Valim2010-06-291-1/+1
|
* Fix several known web encoding issues:wycats2010-06-271-181/+204
| | | | | | | | | | | | | | | | | | | | | | | * Specify accept-charset on all forms. All recent browsers, as well as IE5+, will use the encoding specified for form parameters * Unfortunately, IE5+ will not look at accept-charset unless at least one character in the form's values is not in the page's charset. Since the user can override the default charset (which Rails sets to UTF-8), we provide a hidden input containing a unicode character, forcing IE to look at the accept-charset. * Now that the vast majority of web input is UTF-8, we set the inbound parameters to UTF-8. This will eliminate many cases of incompatible encodings between ASCII-8BIT and UTF-8. * You can safely ignore params[:_snowman_] TODO: * Validate inbound text to confirm it is UTF-8 * Combine the whole_form implementations in form_helper_test and form_tag_helper_test
* make text_field and hidden_field omit the value attribute if the developer ↵Jeff Dean2010-06-231-0/+10
| | | | | | explicitly passes in :value => nil [#4839 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com>
* test for #4862Neeraj Singh2010-06-221-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* form_for without :html and with :remote should not errorDavid Genord II2010-06-181-0/+20
| | | | | | [#4902 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* refactor evals and adds some __FILE__ and __LINE__Santiago Pastorino2010-05-201-3/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fixed 1 failure in ActionPack testsuite [#4613 state:resolved]Hussein Morsy2010-05-161-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Sending :id => nil to form helpers now properly omits the "id" html element ↵Jeff Dean2010-05-151-0/+107
| | | | | | [#4559 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Let label helpers accept blocks.Stephen Celis2010-05-151-3/+7
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵Lawrence Pit2010-05-031-3/+3
| | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com>
* fields_for returns block result when outside ERBRyan Bates2010-04-111-0/+5
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Remove input, form, error_messages_for and error_message_on from the ↵José Valim2010-04-101-37/+0
| | | | framework. If you think you will miss them, feel free to use the dynamic_form plugin available at http://github.com/rails/dynamic_form
* fix stack trace lines on class_evalSantiago Pastorino2010-04-091-2/+2
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Rename search_field to test_search_field (ht: Piotr Usewicz)José Valim2010-04-061-1/+1
|
* Added all the new HTML5 form types as individual form tag methods (search, ↵David Heinemeier Hansson2010-04-051-0/+30
| | | | url, number, etc) (Closes #3646) [Stephen Celis]
* changed from :object_name to :as on form_for apiSantiago Pastorino2010-04-051-11/+7
|
* deprecate form_for(symbol_or_string, ...) in favor of :object_name optionSantiago Pastorino2010-04-051-212/+327
|
* Refactored url_for in AV to have its own instances of the helpers instead of ↵wycats2010-04-031-9/+9
| | | | proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win)
* Make form helpers work with <%= wycats2010-03-091-70/+74
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-10/+3
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* Fix nested attributes with specified collection.José Valim2010-02-071-0/+22
|
* Configuration values should be on AV::Base.José Valim2010-02-021-3/+3
|
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-1/+1
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* form_for should pass :remote to form_tag through html_optionsStephen St. Martin2010-01-311-0/+19
|
* Move form_remote_tag and remote_form_for into prototype_legacy_helperJoshua Peek2010-01-301-29/+0
|
* Revert "Merge branch 'rails/master' into ujs"Joshua Peek2010-01-301-4/+4
| | | | | | | | | | | This reverts commit 3aa1ea1ae4baa4a03d03644e798eeb98a4745785, reversing changes made to 2c12a71378d2146c822acb389b00b866f6420ff5. Conflicts: actionpack/lib/action_view/helpers/javascript_helper.rb actionpack/lib/action_view/helpers/url_helper.rb actionpack/test/template/url_helper_test.rb
* Removed all helpers from PrototypeHelper that are implemented in AjaxHelper. ↵Erik St. Martin2010-01-271-4/+4
| | | | Modified tests that extended with PrototypeHelper to now extend using AjaxHelper. AjaxHelper is now included by default in view helper
* Allow f.submit to be localized per object.José Valim2010-01-151-1/+19
|
* Custom 'type' attribute support for text_field. [#3646 status:resolved]Stephen Celis2010-01-141-0/+5
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make check boxes accept :multiple as option so they can handle collections ↵José Valim2010-01-141-0/+13
| | | | (such as HABTM).
* Call :to_model before working with the object.José Valim2010-01-141-2/+2
|
* Add possibility to use i18n translatios in submit FormHelper.Carlos Antonio da Silva2010-01-141-3/+60
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Use helpers.label instead of views.labels.José Valim2010-01-071-2/+2
|
* I18n label helper [#745 status:resolved]Carsten Gehling2010-01-021-0/+40
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow explicit placement of hidden id element for nested models.Will Read2009-11-151-11/+55
| | | | | | [#3259 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-1/+1
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Moved shared form helper models into fake_modelsJoshua Peek2009-10-031-99/+1
|
* Allow fields_for on a nested_attributes association to accept an explicit ↵Andrew France2009-09-121-0/+36
| | | | | | collection to be used. [#2648 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* Fixed to_label_tag to accept id attribute without changing for attribute ↵Matt Duncan2009-08-091-0/+16
| | | | | | [#2660 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow radio buttons to work with booleans.José Valim2009-08-081-0/+10
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* AMo conversion helperJoshua Peek2009-07-211-5/+10
|
* Finish convert_to_object updatesYehuda Katz2009-07-201-0/+6
|
* Update some tests and add a to_model to form helpersYehuda Katz2009-07-201-5/+5
|
* Move default_form_builder to ActionView so it'll work in environments not ↵Yehuda Katz2009-07-191-3/+3
| | | | using ActionView::Base
* My suggestion to fix ticket 2401 [#2401 state:resolved]Jarl Friis2009-07-021-0/+92
| | | | Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
* Fixes a number of tests that inexplicably didn't fail when we committed the ↵Yehuda Katz + Carl Lerche2009-07-021-5/+5
| | | | original patch
* Use errors[field] instead of errors.on(field)Jeremy Kemper2009-06-171-2/+2
|
* Made label target radio button tags with values. Radio button now respects ↵David Stevenson2009-06-091-0/+19
| | | | | | inherited :index options when generating id. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-43/+242
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.