Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | remove useless nil check | Aaron Patterson | 2014-06-11 | 1 | -2/+2 | |
| | | | | | | | | | irb(main):004:0> /foo/ !~ nil => true irb(main):005:0> /foo/ !~ 'bar' => true irb(main):006:0> /foo/ !~ 'foo' => false | |||||
* | these methods are always called with a tld_parameter | Aaron Patterson | 2014-06-11 | 1 | -3/+3 | |
| | | | | | remove the default parameter since the methods are always called with a parameter | |||||
* | rm `same_host?`. The same conditional is two lines down. | Aaron Patterson | 2014-06-11 | 1 | -5/+3 | |
| | ||||||
* | Revert "rm `same_host?`. The same conditional is two lines down." | Aaron Patterson | 2014-06-11 | 1 | -5/+8 | |
| | | | | This reverts commit 79469b4b0c05a50e19699bc9b568042add2d4987. | |||||
* | rm `same_host?`. The same conditional is two lines down. | Aaron Patterson | 2014-06-11 | 1 | -8/+5 | |
| | ||||||
* | cache host on the stack so we only look it up once | Aaron Patterson | 2014-06-11 | 1 | -8/+9 | |
| | ||||||
* | only pull :protocol from the options hash once | Aaron Patterson | 2014-06-11 | 1 | -2/+3 | |
| | ||||||
* | cache protocol on the stack to reduce options hash lookups | Aaron Patterson | 2014-06-11 | 1 | -7/+7 | |
| | ||||||
* | eliminate nil checks in normalize_port | Aaron Patterson | 2014-06-11 | 1 | -7/+7 | |
| | ||||||
* | reduce hash lookups and disconnect normalize_port from the options hash | Aaron Patterson | 2014-06-11 | 1 | -9/+9 | |
| | ||||||
* | Merge pull request #14986 from dlangevin/trailing-slash-url-generation | Rafael Mendonça França | 2014-05-24 | 1 | -7/+13 | |
|\ | | | | | | | | | | | | | Fixes URL generation with trailing_slash: true Conflicts: actionpack/lib/action_dispatch/http/url.rb | |||||
| * | Fixes URL generation with trailing_slash: true | Dan Langevin | 2014-05-22 | 1 | -9/+17 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | URL generation with trailing_slash: true was adding a trailing slash after .:format Routes.draw do resources :bars end bars_url(trailing_slash: true, format: 'json') # => /bars.json/ This commit removes that extra trailing slash | |||||
* | | fewer string allocations per url_for | Aaron Patterson | 2014-05-20 | 1 | -7/+5 | |
| | | ||||||
* | | mutate the path string to avoid object allocations | Aaron Patterson | 2014-05-20 | 1 | -4/+4 | |
| | | ||||||
* | | push only_path conditional up | Aaron Patterson | 2014-05-20 | 1 | -18/+19 | |
| | | ||||||
* | | push arg checking up | Aaron Patterson | 2014-05-20 | 1 | -4/+4 | |
| | | ||||||
* | | fewer method calls and string garbage when there is no user/password | Aaron Patterson | 2014-05-20 | 1 | -9/+5 | |
| | | ||||||
* | | Always use the provided port for protocol relative urls | Andrew White | 2014-05-11 | 1 | -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 Cavalcanti | 2014-05-11 | 1 | -2/+0 | |
| | | | | | | | | relative URL. | |||||
* | | skip dealing with params if none are provided | Aaron Patterson | 2014-05-09 | 1 | -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 dup | Aaron Patterson | 2014-05-09 | 1 | -4/+3 | |
| | | | | | | | | avoids extra hash allocations on each call | |||||
* | | use unless and || since these options are boolean | Aaron Patterson | 2014-05-09 | 1 | -1/+1 | |
|/ | ||||||
* | Refactor ActionDispatch::Http::URL.build_host_url | Andrew White | 2013-04-18 | 1 | -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 them | Andrew White | 2013-04-18 | 1 | -0/+1 | |
| | ||||||
* | Passing subdomain: '' to url_for removes the subdomain (instead of adding a ↵ | Derek Watson | 2013-04-18 | 1 | -1/+1 | |
| | | | | | | leading .) Adding a boolean route constraint checks for presence/absence of request property | |||||
* | Fix improperly configured host in generated urls | schneems | 2013-03-19 | 1 | -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::URL | Miha Filej | 2013-02-19 | 1 | -0/+3 | |
| | | | | Allows us to use url_for and friends in isolation. | |||||
* | replace regexp global in #url_for | Yves Senn | 2013-01-16 | 1 | -2/+6 | |
| | ||||||
* | do not append a second slash when using | Yves Senn | 2013-01-02 | 1 | -1/+5 | |
| | ||||||
* | Correct the use of params options when given to url_for | Carlos Antonio da Silva | 2012-11-19 | 1 | -1/+1 | |
| | | | | Merge url for tests and add changelog entry for #8233. | |||||
* | Fix issue with params in url_for | tumayun | 2012-11-19 | 1 | -1/+1 | |
| | | | | | | With a "params" argument, the following error is raised: undefined method `reject!` for "":String | |||||
* | Refactor url methods a bit | Carlos Antonio da Silva | 2012-11-16 | 1 | -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 variables | Aaron Patterson | 2012-08-09 | 1 | -0/+6 | |
| | ||||||
* | Remove unnecessary empty line | José Valim | 2012-04-25 | 1 | -1/+0 | |
| | ||||||
* | ActionDispatch::HTTP::Url#url_for refactor method | Bogdan Gusiev | 2012-04-24 | 1 | -20/+26 | |
| | | | | | Separated right side url generation(before query string) from left side url generation(after query string) | |||||
* | Optimize path helpers. | José Valim | 2012-03-02 | 1 | -1/+3 | |
| | ||||||
* | Delegate subdomain method to the URL module, removing duplication | Carlos Antonio da Silva | 2012-01-12 | 1 | -1/+1 | |
| | ||||||
* | Simplify named host logic and missing host condition check | Carlos Antonio da Silva | 2012-01-12 | 1 | -2/+2 | |
| | ||||||
* | Extract ip host regexp to a constant | Carlos Antonio da Silva | 2012-01-12 | 1 | -1/+3 | |
| | ||||||
* | Fix url_for options[:subdomain] to allow objects as values | choonkeat | 2011-12-14 | 1 | -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 Folkens | 2011-11-08 | 1 | -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 fragments | Jeremy Kemper | 2011-10-13 | 1 | -1/+1 | |
| | ||||||
* | Clean up subdomain code a bit. | José Valim | 2011-10-04 | 1 | -2/+2 | |
| | ||||||
* | :subdomain can now be specified with a value of false in url_for, allowing ↵ | Kamil Sobieraj | 2011-10-04 | 1 | -3/+5 | |
| | | | | for subdomain(s) removal from the host during link generation. Closes #2025 | |||||
* | removing backwards compatibility module | Aaron Patterson | 2011-09-12 | 1 | -1/+1 | |
| | ||||||
* | minor correction to the ActionDispatch::Http::URL subdomain docs | Josh Kalderimis | 2011-05-04 | 1 | -1/+1 | |
| | ||||||
* | Fix .subdomain regression. | José Valim | 2011-05-04 | 1 | -1/+1 | |
| | ||||||
* | Filter params that return nil for to_param and allow through false values | Andrew White | 2011-03-09 | 1 | -1/+1 | |
| | ||||||
* | Protocol-relative URL support. | Stephen Celis | 2011-02-02 | 1 | -2/+5 | |
| | | | | | | [#5774 state:committed] Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | |||||
* | Wrap everything in class << self. | José Valim | 2010-12-03 | 1 | -42/+37 | |
| |