aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_tag_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add test select_tag escapes promptSantiago Pastorino2012-08-031-0/+6
|
* load active_support/core_ext/object/inclusion in active_support/railsXavier Noria2012-08-021-1/+0
|
* html_escape should escape single quotesSantiago Pastorino2012-07-311-1/+1
| | | | | https://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content Closes #7215
* Add back `:disable_with` and change deprecation horizon to 4.1Carlos Galdino + Rafael Mendonça França2012-07-211-1/+8
|
* Add back `:confirm` and change deprecation horizon to 4.1Carlos Galdino + Rafael Mendonça França2012-07-211-0/+28
|
* Remove `:confirm` in favor of `:data => { :confirm => 'Text' }` optionCarlos Galdino2012-07-181-2/+9
| | | | | | | | | This applies to the following helpers: `button_to` `button_tag` `image_submit_tag` `link_to` `submit_tag`
* Add several HTML5 input helpersCarlos Galdino2012-05-211-0/+20
| | | | | | | | | | | | The input types added are: - input[type="month"] - input[type="week"] - input[type="datetime"] - input[type="datetime-local"]
* Add HTML5 input[type="color"] helperCarlos Galdino2012-05-211-0/+5
|
* Add HTML5 input[type="time"] helperAlex Soulim2012-05-181-0/+5
|
* Revert "Revert "Remove `:disable_with` in favor of `'data-disable-with'` ↵José Valim2012-05-151-15/+1
| | | | | | | | | option from `submit_tag`, `button_tag` and `button_to` helpers."" Finally remove `:disable_with` but use `:data => { :disable_with => ... }` in examples to show off a better API (which looks nicer in Ruby 1.9) This reverts commit a5c38a9c087e33d36397afc496be7c8e01b37ef0.
* Revert "Remove `:disable_with` in favor of `'data-disable-with'` option from ↵José Valim2012-05-151-1/+15
| | | | | | | | | | `submit_tag`, `button_tag` and `button_to` helpers." `disable_with:` is much easier to type than `"data-disable-with" =>`, and the fact it uses "data-disable-with" => is an implementation concern, it should not affect the public API. This reverts commit 683fc4db00f496e5225928afb4d4e932e0fcdc48.
* Remove `:disable_with` in favor of `'data-disable-with'` option from ↵Carlos Galdino + Rafael Mendonça França2012-05-141-15/+1
| | | | `submit_tag`, `button_tag` and `button_to` helpers.
* Don't break Haml with textarea newline fix.James Coleman2012-03-271-6/+6
| | | | | | 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.
* Allow fieldsets to be created without a block.Ben Pickles2012-03-011-0/+10
|
* Add config.default_method_for_update to support PATCHDavid Lee2012-02-221-0/+6
| | | | | | | | | | | | | | | | PATCH is the correct HTML verb to map to the #update action. The semantics for PATCH allows for partial updates, whereas PUT requires a complete replacement. Changes: * adds config.default_method_for_update you can set to :patch * optionally use PATCH instead of PUT in resource routes and forms * adds the #patch verb to routes to detect PATCH requests * adds #patch? to Request * changes documentation and comments to indicate support for PATCH This change maintains complete backwards compatibility by keeping :put as the default for config.default_method_for_update.
* Add HTML5 input[type="date"] helperOlek Janiszewski2012-02-121-1/+6
|
* removed unnecessary test_pass test from form_tag_helper_test.rbKarunakar (Ruby)2012-01-131-4/+0
|
* test helpers in erb using erblest2011-11-301-7/+9
|
* Removed Unused Variable. Arun Agrawal2011-08-261-1/+1
|
* Merge pull request #2491 from waynn/fix_symbolSantiago Pastorino2011-08-251-0/+6
|\ | | | | fix destructive stringify_keys for label_tag
| * fix destructive stringify_keys for label_tagWaynn Lue2011-08-111-0/+6
| |
* | Unused variable removed.Arun Agrawal2011-08-151-4/+4
|/
* fix stringify_keys destructive behavior for most FormTagHelper functionsWaynn Lue2011-08-031-0/+24
| | | | add four new tests to verify that the other three methods that called stringify_keys! are fixed. verified that the tests break in master without the code patch. Closes #2355
* There are no snowmen hereDavid Lee2011-06-111-2/+2
|
* fix select_tag to have the same behavior of selectDaniel Lopes2011-05-031-2/+8
|
* Remove `#among?` from Active SupportPrem Sichanugrist2011-04-131-1/+1
| | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`.
* Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵David Heinemeier Hansson2011-04-121-1/+1
| | | | suggestion!
* Using Object#in? and Object#either? in various placesPrem Sichanugrist2011-04-111-1/+2
| | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
* Add block support to button_tag helperTom Stuart2011-02-121-0/+9
| | | | | | | | | | | | | | | | | | | As per the HTML 4.01 spec: Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to "image", but the BUTTON element type allows content. Since rich content is the main purpose of the <button> element, it makes sense for the button_tag helper to accept a block. http://www.w3.org/TR/html401/interact/forms.html#edef-BUTTON http://dev.w3.org/html5/spec/the-button-element.html#the-button-element Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com>
* Make type="submit" the default for button_tag helperTom Stuart2011-02-121-1/+8
| | | | | | | | | | | | "submit" is the default value of the <button> element's type attribute according to the HTML 4.01 and the HTML5 draft specs, so if button_tag is going to have a default, type="submit" is a more sensible choice than type="button". http://www.w3.org/TR/html401/interact/forms.html#adef-type-BUTTON http://dev.w3.org/html5/spec/the-button-element.html#attr-button-type Signed-off-by: Santiago Pastorino and Emilio Tagua <santiago+emilioe@wyeworks.com>
* button_tag should escape it contentSantiago Pastorino2011-01-121-0/+7
|
* HTML5 button_tag helperRizwan Reza2011-01-091-0/+28
| | | | | | | | This tag is similar in nature to submit_tag, but allows more control. It also doesn't submit if submit type isn't used, allowing JavaScript to control the flow where required. For more information: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-button-element
* Fix test helpers to ensure get method forms are properly tested [#5753 ↵Aditya Sanghi2010-10-121-3/+7
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Select tags with array options are deprecated, removingCarlos Antonio da Silva2010-09-261-6/+0
|
* Revert "It's snowing!"wycats2010-08-181-1/+1
| | | | This reverts commit e4283007d607454acf97301821ba1e1c417bdead.
* It's snowing!Jeremy Kemper2010-08-121-1/+1
|
* Replace snowman with utf8=✓wycats2010-08-111-1/+1
|
* rename _snowman to _ewycats2010-08-091-1/+1
|
* 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-10/+46
| | | | | | | | | | | | | | | | | | | | | | | * 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
* HTML safety: fix textarea with nil contentJeremy Kemper2010-05-241-0/+6
|
* Improve previous patch a bit [#3645 state:resolved]José Valim2010-05-151-0/+5
|
* Let label helpers accept blocks.Stephen Celis2010-05-151-0/+9
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Merge branch 'master' of github.com:rails/railswycats2010-04-261-3/+0
|\
| * Clean up the config object in ActionPack. Create config_accessor which just ↵José Valim2010-04-221-3/+0
| | | | | | | | delegates to the config object, reducing the number of deprecations and add specific tests.
* | Allow :remote => false to be passed to link_toNicolas Sanguinetti2010-04-221-0/+6
|/ | | | | | | And add tests for `button_to` and `form_tag` which currently behave as expected, so we avoid a regression. Signed-off-by: wycats <wycats@gmail.com>
* 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]
* Refactored url_for in AV to have its own instances of the helpers instead of ↵wycats2010-04-031-5/+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)
* HTML safety: give a deprecation warning if an array of option tags is passed ↵Jeremy Kemper2010-03-311-0/+6
| | | | to select tag. Be sure to join the tag yourself and mark them .html_safe
* Make form helpers work with <%= wycats2010-03-091-12/+6
|