1. 23 10月, 2015 1 次提交
  2. 22 10月, 2015 2 次提交
  3. 21 10月, 2015 1 次提交
  4. 20 10月, 2015 1 次提交
  5. 19 10月, 2015 1 次提交
    • A
      Show helpful messages on invalid param. encodings · 3f81b375
      Agis Anastasopoulos 提交于
      Prior to this change, given a route:
      
          # config/routes.rb
          get ':a' => "foo#bar"
      
      If one pointed to http://example.com/%BE (param `a` has invalid encoding),
      a `BadRequest` would be raised with the following non-informative message:
      
          ActionController::BadRequest
      
      From now on the message displayed is:
      
          Invalid parameter encoding: hi => "\xBE"
      
      Fixes #21923.
      3f81b375
  6. 10 10月, 2015 2 次提交
    • R
      Allow multiple `root` routes in same scope level · 4db921a8
      Rafael Sales 提交于
      When an application has multiple root entries with different
      constraints, the current solution is to use `get '/'`. Example:
      
      **Currently I have to do:**
      ```ruby
      get '/', to: 'portfolio#show', constraints: ->(req) { Hostname.portfolio_site?(req.host) }
      get '/', to: 'blog#show',      constraints: ->(req) { Hostname.blog_site?(req.host) }
      root 'landing#show'
      ```
      
      **But I would like to do:**
      ```ruby
      root 'portfolio#show', constraints: ->(req) { Hostname.portfolio_site?(req.host) }
      root 'blog#show',      constraints: ->(req) { Hostname.blog_site?(req.host) }
      root 'landing#show'
      ```
      
      Other URL matchers such as `get`, `post`, etc, already allows this, so I
      think it's fair that `root` also allow it since it's just a shortcut for
      a `get` internally.
      4db921a8
    • R
      used predicate methods to avoid is_a? checks · ee47e34d
      Ronak Jangir 提交于
      ee47e34d
  7. 08 10月, 2015 1 次提交
    • M
      Fix mounted engine named routes regression · bcfbd8ba
      Matthew Erhard 提交于
      When generating the url for a mounted engine through its proxy, the path should be the sum of three parts:
      
      1. Any `SCRIPT_NAME` request header or the value of `ActionDispatch::Routing::RouteSet#relative_url_root`.
      2. A prefix (the engine's mounted path).
      3. The path of the named route inside the engine.
      
      Since commit https://github.com/rails/rails/commit/44ff0313c121f528a68b3bd21d6c7a96f313e3d3, this has been broken. Step 2 has been changed to:
      
      2. A prefix (the value of `ActionDispatch::Routing::RouteSet#relative_url_root` + the engine's mounted path).
      
      The value of `ActionDispatch::Routing::RouteSet#relative_url_root` is taken into account in step 1 of the route generation and should be ignored when generating the mounted engine's prefix in step 2.
      
      This commit fixes the regression by having `ActionDispatch::Routing::RouteSet#url_for` check `options[:relative_url_root]` before falling back to `ActionDispatch::Routing::RouteSet#relative_url_root`. The prefix generating code then sets `options[:relative_url_root]` to an empty string. This empty string is used instead of `ActionDispatch::Routing::RouteSet#relative_url_root` and avoids the duplicate `relative_url_root` value in the final result.
      
      This resolves #20920 and resolves #21459
      bcfbd8ba
  8. 07 10月, 2015 5 次提交
  9. 06 10月, 2015 1 次提交
    • A
      move file sending to the response object · 69009f44
      Aaron Patterson 提交于
      Just a slight refactor that delegates file sending to the response
      object.  This gives us the advantage that if a webserver (in the future)
      provides a response object that knows how to do accelerated file
      serving, it can implement this method.
      69009f44
  10. 04 10月, 2015 1 次提交
  11. 03 10月, 2015 1 次提交
  12. 02 10月, 2015 2 次提交
  13. 29 9月, 2015 3 次提交
  14. 28 9月, 2015 2 次提交
  15. 26 9月, 2015 5 次提交
  16. 25 9月, 2015 4 次提交
  17. 24 9月, 2015 4 次提交
  18. 23 9月, 2015 3 次提交