aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Cleaned up route optimisation guard condition generation code as it was ↵Tom Lea2008-11-011-0/+13
| | | | | | | | getting a little messy. Add additional condition to handle the case where default_url_options is only defined in the controller, not the view. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* modified current_page? to ignore extra parameters unless specified in optionsErik Andrejko2008-10-261-0/+10
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#805 state:committed]
* Ruby 1.9 compat: set source encodingJeremy Kemper2008-08-231-0/+1
|
* mail_to should use decodeURIcomponent instead of unescape to be utf friendly.miloops2008-08-081-3/+7
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Removed handling of string parameter in link_to to have all URL generation ↵Clemens Kofler2008-07-191-1/+10
| | | | | | done by url_for Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Set global ActionController::Base.view_paths for test casesJoshua Peek2008-07-121-8/+0
|
* Ensure mail_to label is obfuscated for javascript encoding. [#294 ↵Johan Sørensen2008-07-121-0/+1
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Ensure url_for(nil) falls back to url_for({}). [#472 state:resolved]Cheah Chu Yeow2008-07-091-1/+10
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Set precompiled fixture load path constant to speed up testsJoshua Peek2008-06-251-4/+4
|
* Check whether blocks are called from erb using a special __in_erb_template ↵Jeremy Kemper2008-06-191-8/+8
| | | | variable visible in block binding.
* Added block-call style to link_to [Sam Stephenson/DHH]David Heinemeier Hansson2008-06-171-0/+8
|
* Introduce ActionView::TestCase for testing view helpers.Joshua Peek2008-04-191-10/+8
|
* Ruby 1.9 compat: text helperJeremy Kemper2007-12-211-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8464 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Test link_to 'back', :backJeremy Kemper2007-10-161-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7933 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add link_to :back which uses your referrer with a fallback to a javascript ↵Michael Koziarski2007-10-081-1/+11
| | | | | | link. #7366 [eventualbuddha, tarmo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7791 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow ability to disable request forgery protection, disable it in test mode ↵Rick Olson2007-09-281-2/+2
| | | | | | 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/+4
| | | | | | 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
* Roll back #7578, tests failedDavid Heinemeier Hansson2007-09-221-10/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve the error message for assert_redirected_to (closes #7337) [sandofsky]David Heinemeier Hansson2007-09-221-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7578 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that setting the :host option in url_for would automatically turn off ↵David Heinemeier Hansson2007-09-221-1/+19
| | | | | | :only_path (since :host would otherwise not be shown) (closes #9586) [Bounga] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7542 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that link_to with an href of # when using :method will not allow for ↵David Heinemeier Hansson2007-06-231-0/+7
| | | | | | click-through without JavaScript (closes #7037) [stevenbristol/josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7096 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Resources: url_for([parent, child]) generates /parents/1/children/2 for the ↵Jeremy Kemper2007-06-051-3/+62
| | | | | | nested resource. Likewise with the other simply helpful methods like form_for and link_to. Closes #6432. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't double-escape url_for in views. Closes #8144.Jeremy Kemper2007-06-051-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6942 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Removed deprecated parameters_for_method_reference concept (legacy from ↵David Heinemeier Hansson2007-05-121-2/+71
| | | | | | 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
* Deprecation: remove deprecated link_to_image and link_image_to methods. Use ↵Jeremy Kemper2007-03-131-33/+24
| | | | | | link_to(image_path(...), url). git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6405 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Allow Controllers to have multiple view_paths instead of a single ↵Rick Olson2007-02-041-2/+2
| | | | | | template_root. Closes #2754 [John Long] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6120 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* mail_to :encode => 'hex' also encodes the mailto: part of the href attribute ↵Jeremy Kemper2007-01-281-4/+5
| | | | | | as well as the linked email when no name is given. Closes #2061. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6070 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use a consistent load path to avoid double requires. Fix some scattered Ruby ↵Jeremy Kemper2007-01-281-5/+1
| | | | | | warnings. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6057 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* link_to_unless_current works with full URLs as well as paths. Closes #6891.Jeremy Kemper2007-01-121-3/+66
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5896 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deprecated UrlHelper#link_to_image and UrlHelper#link_to :post => true ↵David Heinemeier Hansson2006-10-221-11/+20
| | | | | | (closes #6409) [BobSilva] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5338 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Force *_url named routes to show the host in ActionView [Rick]Rick Olson2006-10-201-1/+56
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add <%= escape_once html %> to escape html while leaving any currently ↵Rick Olson2006-10-181-0/+4
| | | | | | escaped entities alone. Fix button_to double-escaping issue. [Rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5322 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* button_to accepts :method so you can PUT and DELETE with it. Closes #6005.Jeremy Kemper2006-09-031-0/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4914 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :method option to UrlHelper#link_to, which allows for using other ↵David Heinemeier Hansson2006-05-281-2/+9
| | | | | | verbs than GET for the link. This replaces the :post option, which is now deprecated. Example: link_to "Destroy", person_url(:id => person), :method => :delete [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4370 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix double url escaping of remote_function. Add :escape => false option to ↵Nicholas Seckar2006-03-221-0/+2
| | | | | | ActionView's url_for. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Undo accidental escaping for mail_to; add regression test. Fix incorrect ↵Nicholas Seckar2006-03-191-0/+4
| | | | | | credit in changelog. Closes #4202. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Change url_for to escape the resulting URLs when called from a view. Closes ↵Nicholas Seckar2006-03-181-11/+21
| | | | | | #4202 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed link_to "somewhere", :post => true to produce valid XHTML by using the ↵David Heinemeier Hansson2006-03-181-2/+2
| | | | | | parentnode instead of document.body for the instant form (closes #3007) [Bob Silva] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3928 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed testsDavid Heinemeier Hansson2006-02-261-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3665 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Raise a RedirectBackError if redirect_to :back is called when theres no ↵David Heinemeier Hansson2006-01-221-2/+2
| | | | | | HTTP_REFERER defined (closes #3049) [kevin.clark@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3459 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Escape query strings in the href attribute of URLs created by url_helper. #2333Jeremy Kemper2005-10-131-0/+16
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimized tag_options to not sort keys, which is no longer necessary when ↵David Heinemeier Hansson2005-09-201-31/+31
| | | | | | 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
* Fixed that onclick would be overridden even when special features werent usedDavid Heinemeier Hansson2005-09-081-0/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2158 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed a broken testDavid Heinemeier Hansson2005-09-081-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Use this.href, not unexisting urlDavid Heinemeier Hansson2005-09-071-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :post option to UrlHelper#link_to that makes it possible to do POST ↵David Heinemeier Hansson2005-09-071-0/+18
| | | | | | requests through normal ahref links using Javascript git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added :popup option to UrlHelper#link_to #1996 [gabriel.gironda@gmail.com]David Heinemeier Hansson2005-09-041-0/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2129 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make link_to escape the javascript in the confirm option #1964 ↵Jamis Buck2005-08-141-0/+4
| | | | | | [nicolas.pouillard@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2009 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that UrlHelper#mail_to will now also encode the default link title ↵David Heinemeier Hansson2005-07-021-0/+8
| | | | | | #749 [f.svehla@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1601 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added button_to as a form-based solution to deal with harmful actions that ↵David Heinemeier Hansson2005-06-161-0/+22
| | | | | | should be hidden behind POSTs. This makes it just as easy as link_to to create a safe trigger for actions like destroy, although it's limited by being a block element, the fixed look, and a no-no inside other forms. #1371 [tom@moertel.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1437 5ecf4fe2-1ee6-0310-87b1-e25e094e27de