aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/url_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-051-3/+2
|
* Removing unnecessary codeThiago Pradi2010-09-021-7/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵Santiago Pastorino2010-08-141-2/+2
| | | | 's/[ \t]*$//' -i {} \;)
* These tests are trusting in the order of the elements so use OrderedHash ↵Santiago Pastorino2010-07-211-13/+9
| | | | instead of Hash
* Refactor recall parameter normalization [#5021 state:resolved]Andrew White2010-07-031-2/+27
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* We are trying to test that & escapes here not that &amp; is being escaped, ↵Santiago Pastorino2010-06-291-3/+2
| | | | | | also added a cosmetic change to test_link_tag_with_query_and_no_name Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* s/escape_once/html_escape/, since html safety is the contract that now says ↵Xavier Noria2010-06-301-2/+2
| | | | whether something has to be escaped
* url_for no longer escapes HTML, the :escape option is also goneXavier Noria2010-06-301-16/+4
| | | | Rationale: url_for is just a path/URL generator, it is the responsability of the caller to escape conveniently HTML needs it, JavaScript needs different escaping, a text mail needs no escaping at all, etc.
* Restores the escaping of urls generated from hashes. [#4765 state:resolved]Andrew White2010-06-281-8/+4
| | | | | | | | | | | | | | HTML specifications recommend the escaping of urls in web pages, which url_for does by default for string urls and consquently urls generated by path helpers as these return strings. Hashes passed to url_for are not escaped by default and this commit reverses this default so that they are escaped. Undoes the changes of this commit: http://github.com/rails/rails/commit/1b3195b63ca44f0a70b61b75fcf4991cb2fbb944 Signed-off-by: José Valim <jose.valim@gmail.com>
* Normalize recall params when the route is not a standard route otherwise ↵Andrew White2010-06-271-0/+22
| | | | | | :controller and :action may appear in the generated url [#4326 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Allow :remote => false to be passed to link_toNicolas Sanguinetti2010-04-221-0/+14
| | | | | | | 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>
* params already has a setted controller and action hereSantiago Pastorino2010-04-211-1/+0
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* url_for now works with HashWithIndifferentAccess ht jay [#4391 state:committed]Santiago Pastorino2010-04-211-0/+10
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* mail_to with :encode => :javascript now outputs safe htmlSam Elliott2010-04-161-2/+6
| | | | Signed-off-by: Carl Lerche <carllerche@mac.com>
* Consistently use lowercase instead of camelCase for all JS class names in RailsDavid Heinemeier Hansson2010-04-081-10/+10
|
* Refactored url_for in AV to have its own instances of the helpers instead of ↵wycats2010-04-031-215/+204
| | | | 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)
* Fix link_to with blockJeremy Kemper2010-03-151-4/+1
|
* Get rid of the instance-level URL rewriterwycats2010-03-091-2/+0
|
* Reinstate default_url_options and remove url_options= writerJeremy Kemper2010-03-081-1/+1
|
* Start refactoring the method of configuring ActionViewCarlhuda2010-03-031-7/+2
|
* Fix tests for the request refactorCarl Lerche2010-03-031-18/+34
|
* Tweak the semantic of various URL related methods of ActionDispatch::RequestCarlhuda2010-03-031-3/+0
|
* Silence test deprecation warningsCarlhuda2010-02-261-1/+1
|
* Require persisted? in ActiveModel::Lint and remove new_record? and ↵José Valim2010-02-211-18/+18
| | | | destroyed? methods. ActionPack does not care if the resource is new or if it was destroyed, it cares only if it's persisted somewhere or not.
* content_tag should escape its inputBruno Michel2010-02-141-1/+1
| | | | Signed-off-by: Yehuda Katz <yehudakatz@YK.local>
* data-remote needs to be on the form and not the submit when using button_to ↵Erik St. Martin2010-01-311-0/+7
| | | | :remote=>true
* Add rel=nofollow on non get remote linksJoshua Peek2010-01-301-2/+2
|
* updating link_to and button_to to support :remote => true and other options ↵Erik St. Martin2010-01-301-9/+16
| | | | | | 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-9/+9
| | | | | | | | | | | 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
* Deprecate link_to :popupJoshua Peek2010-01-291-30/+0
|
* modified helper that adds attributes for :method to include rel='nofollow' ↵Erik St. Martin2010-01-271-3/+3
| | | | if :method => :delete, same as its remote_ equivalent
* making non remote versions of link_to, button_to, submit_tag and ↵Erik St. Martin2010-01-271-14/+14
| | | | image_submit_tag output data attributes for things like :confirm, :method, :popup, and :disable_with
* Use new routing dsl in testsJoshua Peek2009-12-081-4/+4
|
* Privatize Routing.possible_controllers and fix brittle url helperJoshua Peek2009-11-231-26/+19
| | | | controller test loading.
* Fix brittle query string comparisonsJoshua Peek2009-10-191-6/+13
|
* Make sure non-escaped urls aren't considered safeMichael Koziarski2009-10-151-0/+5
|
* ActionView.url_for doesn't escape by defaultPhil Darnowsky2009-10-151-3/+13
| | | | | | | | | | | | | | | | | ActionView::Helpers::UrlHelper#url_for used to escape the URLs it generated by default. This was most commonly seen when generating a path with multiple query parameters, e.g. url_for(:controller => :foo, :action => :bar, :this => 123, :that => 456) would return http://example.com/foo/bar?that=456&amp;this=123 escaping an ampersand that shouldn't be escaped. This is both wrong and inconsistent with the behavior of ActionController#url_for, and is changed. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* 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)
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-1/+1
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Move helpers specific to functional tests out of TestProcess into AC::TestCaseJoshua Peek2009-09-231-11/+3
|
* Define weblog controller for url helper testJoshua Peek2009-09-131-0/+1
|
* Cleanup hacky routing with controller_path in url helper tests. This doesn't ↵Joshua Peek2009-09-061-62/+56
| | | | work in real life anyway.
* Make sure link_to generates the form with the specified :href if any [#2254 ↵Max Lapshin2009-08-101-0/+8
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* AMo conversion helperJoshua Peek2009-07-211-2/+4
|
* Define ActiveModel API ComplianceYehuda Katz2009-07-201-2/+2
| | | | | | - Define to_model on AR - Define to_model on ActiveModel::APICompliant - Update test fixtures to be API Compliant - Start using to_model in AP
* Move model naming into ActiveModelJoshua Peek2009-06-171-0/+2
|
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-2/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.Jeremy Kemper2009-03-081-1/+1
| | | | | | | | [#1617 state:resolved]
| * Added tests from Andrew Whites fix [#1385 state:committed]David Heinemeier Hansson2009-02-051-0/+21
| |
| * Fix a syntax error in current_page?() that was prevent matches against URL's ↵chris finne2009-02-051-1/+13
| | | | | | | | | | | | with multiple query parameters [#1868 state:committed] Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>