aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* rename _snowman to _ewycats2010-08-091-1/+1
|
* Fix label form helper to use I18n and html options, without the need of ↵Carlos Antonio da Silva2010-08-011-2/+9
| | | | | | | | | | | 'nil' text param: Before: f.label :title, nil, :class => 'title' After : f.label :title, :class => 'title' [#5267 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Makes form_helper use overriden model accessorsSantiago Pastorino2010-08-011-0/+17
| | | | [#3374 state:committed]
* 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