1. 23 5月, 2014 1 次提交
    • D
      Fixes URL generation with trailing_slash: true · 82b4d879
      Dan Langevin 提交于
      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
      82b4d879
  2. 21 5月, 2014 5 次提交
  3. 11 5月, 2014 2 次提交
  4. 10 5月, 2014 3 次提交
  5. 19 4月, 2013 3 次提交
  6. 20 3月, 2013 1 次提交
    • S
      Fix improperly configured host in generated urls · 334549b4
      schneems 提交于
      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
      334549b4
  7. 19 2月, 2013 1 次提交
  8. 17 1月, 2013 1 次提交
  9. 03 1月, 2013 1 次提交
  10. 20 11月, 2012 2 次提交
  11. 16 11月, 2012 1 次提交
    • C
      Refactor url methods a bit · f73a05fb
      Carlos Antonio da Silva 提交于
      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 <<.
      f73a05fb
  12. 10 8月, 2012 1 次提交
  13. 25 4月, 2012 1 次提交
  14. 24 4月, 2012 1 次提交
  15. 02 3月, 2012 1 次提交
  16. 13 1月, 2012 3 次提交
  17. 14 12月, 2011 1 次提交
  18. 08 11月, 2011 1 次提交
    • B
      Fix trouble using :subdomain in development environment when using numeric addresses. · bd559b00
      Bradford Folkens 提交于
          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'
      bd559b00
  19. 14 10月, 2011 1 次提交
  20. 04 10月, 2011 2 次提交
  21. 13 9月, 2011 1 次提交
  22. 05 5月, 2011 2 次提交
  23. 09 3月, 2011 1 次提交
  24. 03 2月, 2011 1 次提交
  25. 03 12月, 2010 1 次提交
  26. 30 11月, 2010 1 次提交
    • J
      The redirect routing method now allows for a hash of options which only... · 0bda6f1e
      Josh Kalderimis 提交于
      The redirect routing method now allows for a hash of options which only 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.
      0bda6f1e