aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_tag_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* fix for IE incompatibility of :disable_with in submit_tagHan Kessels2009-06-011-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-2/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * submit_tag with confirmation and disable_with [#660 state:resolved]Lawrence Pit2009-03-071-2/+9
| | | | | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | Temporarily modifies setup to call super directly. This can support more ↵Yehuda Katz and Carl Lerche2009-04-081-0/+1
|/ | | | T::U runners.
* Register 'checked' as an HTML boolean attribute.Hongli Lai (Phusion)2008-11-181-0/+1
| | | | | | | | | | | | | | | This way, 'tag :foo, :type => "checkbox", :checked => false' would output the expected <input type="checkbox" /> instead of the old <input type="checkbox" checked="false" /> The latter would result in a checkbox that's initially checked. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Tag helper should output an attribute with the value 'false' instead of ↵Hongli Lai (Phusion)2008-11-131-1/+1
| | | | omitting the attribute, if the associated option is false but not nil.
* Fixed that FormTagHelper generates illegal html if name contains e.g. square ↵Vladimir Dobriakov2008-11-041-1/+34
| | | | | | brackets [#1238 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Ensure select_tag#name attribute uses [] when :multiple is true. [#1146 ↵Andrew Kaspick2008-10-071-1/+2
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add options to field_set_tagAndrew Kaspick2008-09-291-0/+6
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1116 state:committed]
* Added image_submit_tag confirm option [status:committed #784]Alastair Brunton2008-09-101-0/+7
| | | | Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* The FormTagHelper#submit_tag helper will now pass along the original value ↵Jose Fernandez2008-09-101-2/+2
| | | | | | of the submit button to the params if the :disable_with option is used [status:committed #633] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
* Fix that label_tag doesn't take a symbol for a name. [#719 state:resolved]Jan De Poorter2008-07-291-0/+6
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure proper output when submit_tag is used with :disabled_with. [#388 ↵Scott Stewart2008-07-021-0/+7
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Check whether blocks are called from erb using a special __in_erb_template ↵Jeremy Kemper2008-06-191-15/+18
| | | | variable visible in block binding.
* Use output_buffer reader and writer methods exclusively instead of hitting ↵Jeremy Kemper2008-06-081-16/+13
| | | | the instance variable so others can override the methods.
* Work with @output_buffer instead of _erboutJeremy Kemper2008-06-021-15/+15
|
* Introduce ActionView::TestCase for testing view helpers.Joshua Peek2008-04-191-6/+2
|
* Added :confirm option to submit_tag (closes #11415) [miloops]David Heinemeier Hansson2008-03-241-1/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9087 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add label_tag helper for generating elements. Closes #10802 [DefV]Michael Koziarski2008-01-211-0/+18
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8685 5ecf4fe2-1ee6-0310-87b1-e25e094e27de