1. 04 1月, 2015 5 次提交
  2. 31 12月, 2014 1 次提交
    • R
      Correctly use the response's status code calling head · 7ef7f1cc
      Robin Dupret 提交于
      Commit 20fece14 introduced the `_status_code` method to fix calls to
      `head :ok`. This method has been added on both ActionController::Metal
      and ActionDispatch::Response.
      
      As for the latter, this method is just equivalent to the `response_code`
      one so commit aefec3c6 removed it from the `Reponse` object so call to
      the `_status_code` method on an ActionController::Base instance would be
      handled by the `Metal` class (which `Base` inherits from) but the status
      code is not updated according to the response at this level.
      
      The fix is to actually rely on `response_code` for ActionController::Base
      instances but this method doesn't exist for bare Metal controllers so we
      need to define it.
      7ef7f1cc
  3. 30 12月, 2014 1 次提交
  4. 23 12月, 2014 1 次提交
  5. 15 12月, 2014 1 次提交
  6. 14 12月, 2014 1 次提交
  7. 13 12月, 2014 1 次提交
  8. 11 12月, 2014 1 次提交
  9. 29 11月, 2014 1 次提交
  10. 25 11月, 2014 2 次提交
  11. 29 10月, 2014 1 次提交
    • G
      Deprecate the `only_path` option on `*_path` helpers. · aa1fadd4
      Godfrey Chan 提交于
      In cases where this option is set to `true`, the option is redundant and can
      be safely removed; otherwise, the corresponding `*_url` helper should be
      used instead.
      
      Fixes #17294.
      
      See also #17363.
      
      [Dan Olson, Godfrey Chan]
      aa1fadd4
  12. 16 10月, 2014 1 次提交
  13. 14 10月, 2014 1 次提交
    • N
      Improve Journey compliance to RFC 3986 · 3041bb2a
      Nicolas Cavigneaux 提交于
      The scanner in Journey fails to recognize routes that use literals
      from the sub-delims section of RFC 3986.
      
      This commit enhance the compatibility of Journey with the RFC by
      adding support of authorized delimiters to the scanner.
      
      Fix #17212
      3041bb2a
  14. 26 9月, 2014 1 次提交
  15. 25 9月, 2014 1 次提交
  16. 06 9月, 2014 1 次提交
  17. 29 8月, 2014 1 次提交
    • P
      Don't rescue IPAddr::InvalidAddressError · a59a9b7f
      Peter Suschlik 提交于
      IPAddr::InvalidAddressError does not exist in Ruby 1.9.3
      and fails for JRuby in 1.9 mode.
      
      As IPAddr::InvalidAddressError is a subclass of ArgumentError
      (via IPAddr::Error) just rescuing ArgumentError is fine.
      a59a9b7f
  18. 27 8月, 2014 1 次提交
  19. 25 8月, 2014 1 次提交
  20. 22 8月, 2014 1 次提交
    • S
      Refactor ActionDispatch::RemoteIp · f9a84bb2
      Sam Aarons 提交于
      Refactored IP address checking in ActionDispatch::RemoteIp to rely on
      the IPAddr class instead of the unwieldly regular expression to match
      IP addresses. This commit keeps the same api but allows users to pass
      IPAddr objects to config.action_dispatch.trusted_proxies in addition
      to passing strings and regular expressions.
      
      Example:
      
          # config/environments/production.rb
          config.action_dispatch.trusted_proxies = IPAddr.new('4.8.15.0/16')
      f9a84bb2
  21. 21 8月, 2014 2 次提交
    • G
      Avoid duplicating routes for HEAD requests. · d3eb92d9
      Guo Xiang Tan 提交于
      Follow up to rails#15321
      
      Instead of duplicating the routes, we will first match the HEAD request to
      HEAD routes. If no match is found, we will then map the HEAD request to
      GET routes.
      d3eb92d9
    • S
      Enable gzip compression by default · cfaaacd9
      schneems 提交于
      If someone is using ActionDispatch::Static to serve assets and makes it past the `match?` then the file exists on disk and it will be served. This PR adds in logic that checks to see if the file being served is already compressed (via gzip) and on disk, if it is it will be served as long as the client can handle gzip encoding. If not, then a non gzip file will be served.
      
      This additional logic slows down an individual asset request but should speed up the consumer experience as compressed files are served and production applications should be delivered with a CDN. This PR allows a CDN to cache a gzip file by setting the `Vary` header appropriately. In net this should speed up a production application that are using Rails as an origin for a CDN. Non-asset request speed is not affected in this PR.
      cfaaacd9
  22. 19 8月, 2014 2 次提交
    • P
      Make `AC::Params#to_h` return Hash with safe keys · 5109740c
      Prem Sichanugrist 提交于
      `ActionController::Parameters#to_h` now returns a `Hash` with
      unpermitted keys removed. This change is to reflect on a security
      concern where some method performed on an `ActionController::Parameters`
      may yield a `Hash` object which does not maintain `permitted?` status.
      If you would like to get a `Hash` with all the keys intact, duplicate
      and mark it as permitted before calling `#to_h`.
      
          params = ActionController::Parameters.new(name: 'Senjougahara Hitagi')
          params.to_h # => {}
      
          unsafe_params = params.dup.permit!
          unsafe_params.to_h # => {"name"=>"Senjougahara Hitagi"}
      
          safe_params = params.permit(:name)
          safe_params.to_h # => {"name"=>"Senjougahara Hitagi"}
      
      This change is consider a stopgap as we cannot chage the code to stop
      `ActionController::Parameters` to inherit from
      `HashWithIndifferentAccess` in the next minor release.
      
      Also, adding a CHANGELOG entry to mention that
      `ActionController::Parameters` will not inheriting from
      `HashWithIndifferentAccess` in the next major version.
      5109740c
    • R
      9cb4d3e0
  23. 18 8月, 2014 3 次提交
    • G
      Use AS::JSON for (de)serializing cookies · e158ee50
      Godfrey Chan 提交于
      Use the Active Support JSON encoder for cookie jars using the `:json` or
      `:hybrid` serializer. This allows you to serialize custom Ruby objects into
      cookies by defining the `#as_json` hook on such objects.
      
      Fixes #16520.
      e158ee50
    • K
      Prepare for partial release. · 1e2ffe7a
      Kasper Timm Hansen 提交于
      - Default to Rails::DeprecatedSanitizer in ActionView::Helpers::SanitizeHelper.
      - Add upgrade notes.
      - Add sanitizer to new applications Gemfiles.
      - Remove 'rails-dom-testing' as a dependency.
      1e2ffe7a
    • J
      Move respond_with to the responders gem · ee77770d
      José Valim 提交于
      respond_with (and consequently the class-level respond_to)
      are being removed from Rails. Instead of moving it to a 3rd
      library, the functionality will be moved to responders gem
      (at github.com/plataformatec/responders) which already provides
      some responders extensions.
      ee77770d
  24. 17 8月, 2014 1 次提交
    • J
      When your templates change, browser caches bust automatically. · 6c96602b
      Jeremy Kemper 提交于
      New default: the template digest is automatically included in your ETags.
      When you call `fresh_when @post`, the digest for `posts/show.html.erb`
      is mixed in so future changes to the HTML will blow HTTP caches for you.
      This makes it easy to HTTP-cache many more of your actions.
      
      If you render a different template, you can now pass the `:template`
      option to include its digest instead:
      
        fresh_when @post, template: 'widgets/show'
      
      Pass `template: false` to skip the lookup. To turn this off entirely, set:
      
        config.action_controller.etag_with_template_digest = false
      6c96602b
  25. 14 8月, 2014 2 次提交
  26. 13 8月, 2014 1 次提交
  27. 09 8月, 2014 2 次提交
  28. 08 8月, 2014 1 次提交
  29. 19 7月, 2014 1 次提交