aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/url.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | mutate the path string to avoid object allocationsAaron Patterson2014-05-201-4/+4
| |
* | push only_path conditional upAaron Patterson2014-05-201-18/+19
| |
* | push arg checking upAaron Patterson2014-05-201-4/+4
| |
* | fewer method calls and string garbage when there is no user/passwordAaron Patterson2014-05-201-9/+5
| |
* | Always use the provided port for protocol relative urlsAndrew White2014-05-111-0/+2
| | | | | | | | | | There may be situations where you need to tunnel SSL connections over port 80 so we shouldn't remove it if it has been explicitly provided.
* | ActionDispatch::Http::URL.normalize_port should not strip port for protocol ↵Guilherme Cavalcanti2014-05-111-2/+0
| | | | | | | | relative URL.
* | skip dealing with params if none are providedAaron Patterson2014-05-091-4/+11
| | | | | | | | | | | | | | | | | | | | | | This lets us avoid 1. A slow call to Hash#slice 2. An is_a? test 3. Extra hash allocations (from slice) 4. String allocations etc.
* | don't mutate the options hash, so we don't have to dupAaron Patterson2014-05-091-4/+3
| | | | | | | | avoids extra hash allocations on each call
* | use unless and || since these options are booleanAaron Patterson2014-05-091-1/+1
|/
* Refactor ActionDispatch::Http::URL.build_host_urlAndrew White2013-04-181-20/+49
| | | | | Add support for extracting the port from the :host option and for removing the subdomain by using nil, false or ''.
* Duplicate options before mutating themAndrew White2013-04-181-0/+1
|
* Passing subdomain: '' to url_for removes the subdomain (instead of adding a ↵Derek Watson2013-04-181-1/+1
| | | | | | leading .) Adding a boolean route constraint checks for presence/absence of request property
* Fix improperly configured host in generated urlsschneems2013-03-191-1/+12
| | | | | | | | | | | | | | | | | | | If the host in `default_url_options` is accidentally set with a protocol such as ``` host: "http://example.com" ``` then the generated url will have the protocol twice `http://http://example.com` which is not what the user intended. Likely they wanted to define a host `host: "example.com"` and a `protocol: "http://"` but did not know the convention. This may not the most common problem, but when it happens it can go undetected for a while. I accidentally added `http://` out of habit recently only to find all the links in my emails were broken after deploying a demo site to production. Rather than allow this accident go undetected, we can fix the problem in line by properly setting the protocol and host. I was able to find this related question on stack overflow: http://stackoverflow.com/questions/5878329/rails-3-devise-how-do-i-make-the-email-confirmation-links-use-secure-https-n where the answer was highly upvoted. This is based off of work in #7415 cc/ @pixeltrix ATP Action Mailer and Action Pack
* Require AS deps in ActionDispatch::Http::URLMiha Filej2013-02-191-0/+3
| | | | Allows us to use url_for and friends in isolation.
* replace regexp global in #url_forYves Senn2013-01-161-2/+6
|
* do not append a second slash when usingYves Senn2013-01-021-1/+5
|
* Correct the use of params options when given to url_forCarlos Antonio da Silva2012-11-191-1/+1
| | | | Merge url for tests and add changelog entry for #8233.
* Fix issue with params in url_fortumayun2012-11-191-1/+1
| | | | | | With a "params" argument, the following error is raised: undefined method `reject!` for "":String
* Refactor url methods a bitCarlos Antonio da Silva2012-11-161-9/+9
| | | | | | Use if..else conditions instead of return guards. Use _ for not used arguments when iterating. Set the path variable directly instead of using an empty string and <<.
* initialize instance variablesAaron Patterson2012-08-091-0/+6
|
* Remove unnecessary empty line José Valim2012-04-251-1/+0
|
* ActionDispatch::HTTP::Url#url_for refactor methodBogdan Gusiev2012-04-241-20/+26
| | | | | Separated right side url generation(before query string) from left side url generation(after query string)
* Optimize path helpers.José Valim2012-03-021-1/+3
|
* Delegate subdomain method to the URL module, removing duplicationCarlos Antonio da Silva2012-01-121-1/+1
|
* Simplify named host logic and missing host condition checkCarlos Antonio da Silva2012-01-121-2/+2
|
* Extract ip host regexp to a constantCarlos Antonio da Silva2012-01-121-1/+3
|
* Fix url_for options[:subdomain] to allow objects as valueschoonkeat2011-12-141-1/+1
| | | | * e.g. blog_url(subdomain: current_user) instead of blog_url(subdomain: current_user.to_param)
* Fix trouble using :subdomain in development environment when using ↵Bradford Folkens2011-11-081-1/+1
| | | | | | | | | | | | | | | | numeric addresses. See-also pull request #3561 from 3-1-stable Otherwise the following occurs: TypeError: can't convert nil into String /Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/http/url.rb:75:in host_or_subdomain_and_domain' /Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/http/url.rb:37:in url_for' /Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/routing/url_for.rb:147:in test_subdomain_may_be_accepted_with_numeric_host' /Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in run' /Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/callbacks.rb:426:in send' /Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/callbacks.rb:81:in run'
* / is allowed in URI fragmentsJeremy Kemper2011-10-131-1/+1
|
* Clean up subdomain code a bit.José Valim2011-10-041-2/+2
|
* :subdomain can now be specified with a value of false in url_for, allowing ↵Kamil Sobieraj2011-10-041-3/+5
| | | | for subdomain(s) removal from the host during link generation. Closes #2025
* removing backwards compatibility moduleAaron Patterson2011-09-121-1/+1
|
* minor correction to the ActionDispatch::Http::URL subdomain docsJosh Kalderimis2011-05-041-1/+1
|
* Fix .subdomain regression.José Valim2011-05-041-1/+1
|
* Filter params that return nil for to_param and allow through false valuesAndrew White2011-03-091-1/+1
|
* Protocol-relative URL support.Stephen Celis2011-02-021-2/+5
| | | | | | [#5774 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Wrap everything in class << self.José Valim2010-12-031-42/+37
|
* The redirect routing method now allows for a hash of options which only ↵Josh Kalderimis2010-11-301-0/+52
| | | | changes the relevant parts of the url, or an object which responds to call can be supplied so common redirect rules can be easily reused. This commit includes a change where url generation from parts has been moved to AD::Http::URL as a class method.
* port_string bought back to life as it is part of the public apiJosh Kalderimis2010-11-241-3/+8
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* :subdomain, :domain and :tld_length options can now be used in url_for, ↵Josh Kalderimis2010-11-231-20/+39
| | | | | | allowing for easy manipulation of the host during link generation. Signed-off-by: José Valim <jose.valim@gmail.com>
* Brought the domain method in AD http url inline with subdomain where ↵Josh Kalderimis2010-11-161-1/+2
| | | | @@tld_length is used by default. Also set the default value of @@tld_length to 1.
* Fix loop introduced by rack:dda892dJeremy Kemper2010-10-261-6/+1
|
* Rely on Rack::Session stores API for more compatibility across the Ruby world.José Valim2010-10-031-5/+0
|
* Cache 2 of Request's commonly called methods.thedarkone2010-09-271-2/+2
|
* Add configuration option for tld lengthSimon Jefford2010-09-091-4/+6
|
* Cleanup deprecations in Action DispatchCarlos Antonio da Silva2010-09-061-8/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* escape constants that should not be linked toJoost Baaij2010-08-271-2/+2
|
* Don't add the standard https port when using redirect in routes.rb and ↵Andrew White2010-08-201-0/+10
| | | | | | | | ensure that request.scheme returns https when using a reverse proxy. [#5408 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add caller to request_uri deprecation noticeCarlhuda2010-03-031-1/+1
|
* ActionDispatch::Request deprecates #request_uriCarl Lerche2010-03-031-10/+3
| | | | * Refactored ActionPatch to use fullpath instead