1. 26 7月, 2011 1 次提交
  2. 14 7月, 2011 1 次提交
  3. 08 6月, 2011 1 次提交
  4. 09 5月, 2011 1 次提交
  5. 16 4月, 2011 1 次提交
  6. 13 4月, 2011 1 次提交
  7. 22 3月, 2011 1 次提交
  8. 03 2月, 2011 1 次提交
  9. 01 2月, 2011 1 次提交
  10. 09 12月, 2010 1 次提交
  11. 18 11月, 2010 1 次提交
  12. 13 11月, 2010 1 次提交
  13. 11 11月, 2010 2 次提交
  14. 11 10月, 2010 1 次提交
  15. 08 10月, 2010 1 次提交
  16. 29 9月, 2010 1 次提交
  17. 02 9月, 2010 1 次提交
  18. 30 8月, 2010 1 次提交
  19. 11 8月, 2010 1 次提交
  20. 13 6月, 2010 1 次提交
  21. 17 5月, 2010 3 次提交
    • W
      Revert "Moved encoding work in progress to a feature branch." · 80b60671
      wycats 提交于
      This reverts commit ade756fe.
      80b60671
    • J
      Moved encoding work in progress to a feature branch. · ade756fe
      Jeremy Kemper 提交于
      This reverts commits af0d1a88 and 64d109e3.
      ade756fe
    • W
      Significantly improved internal encoding heuristics and support. · 64d109e3
      wycats 提交于
      * Default Encoding.default_internal to UTF-8
      * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file
      * Read templates as BINARY, use default_external or template-wide magic comments
        inside the Template to set the initial encoding
        * This means that template handlers in Ruby 1.9 will receive Strings encoded
          in default_internal (UTF-8 by default)
      * Create a better Exception for encoding issues, and use it when the template
        source has bytes that are not compatible with the specified encoding
      * Allow template handlers to opt-into handling BINARY. If they do so, they
        need to do some of their own manual encoding work
      * Added a "Configuration Gotchas" section to the intro Rails Guide instructing
        users to use UTF-8 for everything
      * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid
        $KCODE value is used
      
      Also:
      * Fixed a few tests that were assert() rather than assert_equal() and
        were caught by Minitest requiring a String for the message
      * Fixed a test where an assert_select was misformed, also caught by
        Minitest being more restrictive
      * Fixed a test where a Rack response was returning a String rather
        than an Enumerable
      64d109e3
  22. 09 5月, 2010 1 次提交
  23. 09 4月, 2010 2 次提交
  24. 03 4月, 2010 1 次提交
  25. 19 3月, 2010 1 次提交
  26. 16 3月, 2010 1 次提交
    • C
      Add deprecation notices for <% %>. · 9de83050
      Carlhuda 提交于
        * The approach is to compile <% %> into a method call that checks whether
          the value returned from a block is a String. If it is, it concats to the buffer and
          prints a deprecation warning.
        * <%= %> uses exactly the same logic to compile the template, which first checks
          to see whether it's compiling a block.
        * This should have no impact on other uses of block in templates. For instance, in
          <% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
          not a String, so the result is not concatenated
        * In two cases (#capture and #cache), a String can be returned that should *never*
          be concatenated. We have temporarily created a String subclass called NonConcattingString
          which behaves (and is serialized) identically to String, but is not concatenated
          by the code that handles deprecated <% %> block helpers. Once we remove support
          for <% %> block helpers, we can remove NonConcattingString.
      9de83050
  27. 11 3月, 2010 1 次提交
  28. 08 3月, 2010 1 次提交
  29. 06 3月, 2010 1 次提交
  30. 03 3月, 2010 1 次提交
  31. 03 12月, 2009 1 次提交
    • C
      Reorganize autoloads: · c1304098
      Carlhuda 提交于
        * A new module (ActiveSupport::Autoload) is provide that extends
          autoloading with new behavior.
        * All autoloads in modules that have extended ActiveSupport::Autoload
          will be eagerly required in threadsafe environments
        * Autoloads can optionally leave off the path if the path is the same
          as full_constant_name.underscore
        * It is possible to specify that a group of autoloads live under an
          additional path. For instance, all of ActionDispatch's middlewares
          are ActionDispatch::MiddlewareName, but they live under 
          "action_dispatch/middlewares/middleware_name"
        * It is possible to specify that a group of autoloads are all found
          at the same path. For instance, a number of exceptions might all
          be declared there.
        * One consequence of this is that testing-related constants are not
          autoloaded. To get the testing helpers for a given component,
          require "component_name/test_case". For instance, "action_controller/test_case".
        * test_help.rb, which is automatically required by a Rails application's
          test helper, requires the test_case.rb for all active components, so
          this change will not be disruptive in existing or new applications.
      c1304098
  32. 08 10月, 2009 1 次提交
    • M
      Switch to on-by-default XSS escaping for rails. · 94159359
      Michael Koziarski 提交于
        This consists of:
      
        * String#html_safe! a method to mark a string as 'safe'
        * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it
        * Calls to String#html_safe! throughout the rails helpers
        * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB)
        * New ERB implementation based on erubis which uses a SafeBuffer instead of a String
      
      Hat tip to Django for the inspiration.
      94159359
  33. 20 9月, 2009 1 次提交
  34. 16 8月, 2009 3 次提交
    • Y
      Got tests to pass with some more changes. · 1310231c
      Yehuda Katz 提交于
        * request.formats is much simpler now
          * For XHRs or Accept headers with a single item, we use the Accept header
          * For other requests, we use params[:format] or fallback to HTML
          * This is primarily to work around the fact that browsers provide completely
            broken Accept headers, so we have to whitelist the few cases we can
            specifically isolate and treat other requests as coming from the browser
          * For APIs, we can support single-item Accept headers, which disambiguates
            from the browsers
        * Requests to an action that only has an XML template from the browser will
          no longer find the template. This worked previously because most browsers
          provide a catch-all */*, but this was mostly accidental behavior. If you
          want to serve XML, either use the :xml format in links, or explicitly
          specify the XML template: render "template.xml".
      1310231c
    • Y
      More cleanup of ActionView and reduction in need for blocks in some cases: · 9f5cd015
      Yehuda Katz 提交于
        * only one of partial_name or :as will be available as a local
        * `object` is removed
        * Simplify _layout_for in most cases.
          * Remove <% render :partial do |args| %>
          * <% render :partial do %> still works fine
      9f5cd015
    • Y
      Clean up ActionView some: · 27adcd1c
      Yehuda Katz 提交于
        * Call _evaluate_assigns_and_ivars at the two entry points so we don't have to
          do a check at every render.
        * Make template.render viable without having to go through a wrapper method
        * Remove old TemplateHandler#render(template, local_assigns) path so we don't have
          to set self.template every time we render a template.
        * Move Template rescuing code to Template#render so it gets caught every time.
        * Pull in some tests from Pratik that test render @object in ActionView
      27adcd1c