aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_tag_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate `:disable_with` for `button_tag` tooCarlos Galdino + Rafael Mendonça França2012-05-141-3/+12
|
* Deprecate `:disable_with` in favor of `'data-disable-with'` option for ↵Carlos Galdino + Rafael Mendonça França2012-05-141-12/+18
| | | | `button_to` and `submit_tag` 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.
* 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
|
* Start refactoring the method of configuring ActionViewCarlhuda2010-03-031-5/+4
|
* content_tag should escape its inputBruno Michel2010-02-141-8/+8
| | | | Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
* Modify the behavior of `radio_button_tag` to use `sanitize_to_id` for ↵Prem Sichanugrist2010-02-021-0/+4
| | | | | | consistency [#1792 status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-3/+3
| | | | | | | | | | | | 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.
* add :remote option to form_tagStephen St. Martin2010-01-311-0/+6
|
* Generate UJS code for :disable_withJoshua Peek2010-01-301-3/+3
|
* updating link_to and button_to to support :remote => true and other options ↵Erik St. Martin2010-01-301-3/+3
| | | | | | such as :confirm in a unobtrusive manor Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Revert "Merge branch 'rails/master' into ujs"Joshua Peek2010-01-301-6/+6
| | | | | | | | | | | 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
* making non remote versions of link_to, button_to, submit_tag and ↵Erik St. Martin2010-01-271-6/+6
| | | | image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with
* Start adding configuration to ActionView instead of using constants.Yehuda Katz2009-10-141-0/+3
| | | | | | | By using config rather than hardcoded constants, we can evolve the configuration system over time (we'd just need to update the config method with more robust capabilities and all consumers would get the capabilities with no code changes)
* Add :include_blank option for select_tag [#1987 status:resolved]rizwanreza2009-08-081-0/+12
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fixes a number of tests that inexplicably didn't fail when we committed the ↵Yehuda Katz + Carl Lerche2009-07-021-3/+3
| | | | original patch
* Make text_area_tag escape contents by default.Chris Mear2009-06-271-0/+12
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2015 state:committed]
* Sanitized the id generated by text_area_tag helper method. ↵Stephen Anderson2009-06-091-0/+5
| | | | | | text_area_tag('item[description]') should return: <textarea id="item_description" name="item[description]"></textarea> instead of: <textarea id="item[description]" name="item[description]"></textarea> The old id was causing HTML validation failures. Signed-off-by: Michael Koziarski <michael@koziarski.com>