aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/form_tag_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* 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
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Expand form helper test coverage. Closes #9950 [robinjfisher]Jeremy Kemper2007-10-221-1/+55
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow ability to disable request forgery protection, disable it in test mode ↵Rick Olson2007-09-281-4/+3
| | | | | | by default. Closes #9693 [lifofifo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge csrf_killer plugin into rails. Adds RequestForgeryProtection model ↵Rick Olson2007-09-231-0/+5
| | | | | | that verifies session-specific _tokens for non-GET requests. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7592 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rename fieldset_tag to field_set_tag to follow the conventions from ↵David Heinemeier Hansson2007-09-091-4/+4
| | | | | | text_area and text_field [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7423 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add fieldset_tag for generating fieldsets, closes #9477. [djanowski]Michael Koziarski2007-09-061-0/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7413 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that radio_button_tag should generate unique ids (closes #3353) ↵David Heinemeier Hansson2007-06-231-0/+3
| | | | | | [BobSilva/rebecca/josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7093 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve helper test coverage. Closes #7215, #7233, #7234, #7235, #7236, ↵Jeremy Kemper2007-06-131-0/+8
| | | | | | #7237, #7238. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed deprecated parameters_for_method_reference concept (legacy from ↵David Heinemeier Hansson2007-05-121-3/+3
| | | | | | before named routes) [DHH] Added record identification with polymorphic routes for ActionController::Base#url_for and ActionView::Base#url_for [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6729 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that FormTagHelper#submit_tag will return to its original state if the ↵David Heinemeier Hansson2007-03-271-1/+1
| | | | | | submit fails and you're using :disable_with [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6480 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecation: remove deprecated update_element_function, start_form_tag, and ↵Jeremy Kemper2007-03-131-29/+0
| | | | | | end_form_tag. Use RJS and form_tag instead. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6409 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that FormTagHelper#text_area_tag should disregard :size option if it's ↵David Heinemeier Hansson2007-03-031-0/+6
| | | | | | not a string [Brendon Davidson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6300 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Set the original button value in an attribute of the button when using the ↵Jamis Buck2007-02-281-1/+1
| | | | | | :disable_with key with submit_tag git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Mime::Type convenience methods to check the current mime type. [Rick]Rick Olson2007-02-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6152 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix that FormTagHelper#submit_tag using :disable_with should trigger the ↵David Heinemeier Hansson2007-02-061-1/+1
| | | | | | onsubmit handler of its form if available [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6134 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use a consistent load path to avoid double requires. Fix some scattered Ruby ↵Jeremy Kemper2007-01-281-1/+1
| | | | | | warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecate start_form_tag and end_form_tag. Use form_tag / '</form>' from ↵Rick Olson2006-10-241-0/+28
| | | | | | now on. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added block-usage to PrototypeHelper#form_remote_tag, document block-usage ↵Rick Olson2006-10-241-2/+2
| | | | | | of FormTagHelper#form_tag [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made FormTagHelper#form_tag work with blocks, rendering start/end_form_tag ↵David Heinemeier Hansson2006-10-231-1/+18
| | | | | | deprecated git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5345 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* radio_button_tag generates unique id attributes. Closes #3353.Jeremy Kemper2006-09-031-1/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4925 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Expanded :method option in FormHelper#form_tag to allow for verbs other than ↵David Heinemeier Hansson2006-05-281-0/+6
| | | | | | GET and POST by automatically creating a hidden form field named _method, which will simulate the other verbs over post [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4371 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :disable_with option to FormTagHelper#submit_tag to allow for easily ↵David Heinemeier Hansson2005-12-301-0/+7
| | | | | | disabled submit buttons with different text [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3361 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added FormHelper#form_for and FormHelper#fields_for that makes it easier to ↵David Heinemeier Hansson2005-11-131-0/+4
| | | | | | work with forms for single objects also if they don't reside in instance variables [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3003 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make xyz_tag(..., :id => "foo") work againJamis Buck2005-10-121-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2535 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimized tag_options to not sort keys, which is no longer necessary when ↵David Heinemeier Hansson2005-09-201-15/+15
| | | | | | assert_dom_equal and friend is available #1995 [skae]. Added assert_dom_equal and assert_dom_not_equal to compare tags generated by the helpers in an order-indifferent manner #1995 [skae] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that nil options are not included in tags, so tag("p", :ignore => nil) ↵David Heinemeier Hansson2005-07-091-2/+2
| | | | | | now returns <p /> not <p ignore="" /> but that tag("p", :ignore => "") still includes it #1465 [michael@schuerig.de] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1789 5ecf4fe2-1ee6-0310-87b1-e25e094e27de