Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Jun 5, 2010
  1. @wycats

    Optimize LookupContext

    wycats authored
Commits on Apr 3, 2010
  1. @wycats

    Refactored url_for in AV to have its own instances of the helpers ins…

    wycats authored
    …tead of proxying back to the controller. This potentially allows for more standalone usage of AV. It also kicked up a lot of dust in the tests, which were mocking out controllers to get this behavior. By moving it to the view, it made a lot of the tests more standalone (a win)
Commits on Mar 30, 2010
  1. @wycats

    Replace the placeholder base_hook API with on_load. To specify some c…

    wycats authored
    …ode that
    should run during framework load do:
    ActiveSupport.on_load(:action_controller) do
      # Code run in the context of AC::Base
Commits on Mar 19, 2010
  1. @wycats
Commits on Mar 17, 2010
  1. @wycats

    Remove some 1.9 warnings (resulting in some fixed bugs). Remaining AM…

    wycats authored
    … warnings are in dependencies.
Commits on Mar 7, 2010
  1. @wycats

    Make many parts of Rails lazy. In order to facilitate this,

    wycats authored
    add lazy_load_hooks.rb, which allows us to declare code that
    should be run at some later time. For instance, this allows
    us to defer requiring ActiveRecord::Base at boot time purely
    to apply configuration. Instead, we register a hook that should
    apply configuration once ActiveRecord::Base is loaded.
    With these changes, brings down total boot time of a
    new app to 300ms in production and 400ms in dev.
    TODO: rename base_hook
Commits on Oct 15, 2009
  1. @wycats
  2. @wycats
Commits on Oct 14, 2009
  1. @wycats

    Start adding configuration to ActionView instead of using constants.

    wycats authored
      By using config rather than hardcoded constants, we can evolve the
      configuration system over time (we'd just need to update the config
      method with more robust capabilities and all consumers would get
      the capabilities with no code changes)
Commits on Oct 9, 2009
  1. @wycats

    Get rid of constant name usage for stack trace help in favor of overr…

    wycats authored
    …iding #inspect and .name.
Commits on Oct 7, 2009
  1. @wycats
  2. @wycats

    Fix warning spew

    wycats authored
Commits on Aug 15, 2009
  1. @wycats

    Got tests to pass with some more changes.

    wycats authored
      * 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".
  2. @wycats

    Clean up ActionView some:

    wycats authored
      * 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
Commits on Aug 9, 2009
  1. @wycats

    Experimental: Improve performance of ActionView by preventing method …

    wycats authored
    …cache flushing due to runtime Kernel#extend:
      * The helper module adds a new _helper_serial property onto AbstractController subclasses
      * When #helper is used to add helpers to a class, the serial number is updated
      * An ActionView subclass is created and cached based on this serial number.
        * That subclass includes the helper module from the controller
        * Subsequent requests using the same controller with the same serial will result in
          reusing that subclass, rather than being forced to take an action (like include
          or extend) that will result in a global method cache flush on MRI and a flush 
          of the entire AV class' cache on JRuby.
      * For now, this optimization is not applied to the RJS helpers, which results in
        a global method cache flush in MRI and a flush of the JavaScriptGenerator class in
        JRuby only when using RJS.
        * Since the effects are limited to using RJS, and would only affect JavaScriptGenerator
          in JRuby (as opposed to the entire view object), it seems worthwhile to apply this
      * This resulted in a significant performance improvement. I will have benchmarks
        in the next day or two that show the performance impact of the last several
      * There is a small chance this could break existing code (although I'm not sure how).
        If that happens, please report it immediately.
  2. @wycats

    Cache controller_path on the AV instance to avoid needing to make add…

    wycats authored
    …itional calls back into the controller for each attempt (this was done because these calls were adding up significantly in partial rendering and showing up on profiles)
  3. @wycats

    Rendering a template from ActionView will default to looking for part…

    wycats authored
    …ials only in the current mime type.
      * The old behavior was tested only as a side-effect of a different test--the original tests remain;
        a new template in the XML mime was added.
      * If you are relying on the current behavior and object to this change, please participate in
Commits on Aug 7, 2009
  1. @wycats
Commits on Jul 19, 2009
  1. @wycats
  2. @wycats
Commits on Apr 13, 2009
  1. @wycats

    Bring abstract_controller up to date with rails/master

    wycats authored
    Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
    of commits that could not be applied cleanly or are obviated with the
    abstract_controller refactor. They all need to be revisited to ensure
    that fixes made in 2.3 do not reappear in 3.0:
    AR not available
      * This will be reimplemented with ActionORM or equivalent
    implicitly rendering a js response should not use the default layout
    [#1844 state:resolved]
      * This will be handled generically
    Improve view rendering performance in development mode and reinstate
    template recompiling in production [#1909 state:resolved]
      * We will need to reimplement rails-dev-boost on top of the refactor;
        the changes here are very implementation specific and cannot be
        cleanly applied. The following commits are implicated:
    workaround for picking layouts based on wrong view_paths
    [#1974 state:resolved]
      * The specifics of this commit no longer apply. Since it is a two-line
        commit, we will reimplement this change.
    make action_controller/layouts pick templates from the current instance's
    view_paths instead of the class view_paths [#1974 state:resolved]
      * This does not apply at all. It should be trivial to apply the feature
        to the reimplemented ActionController::Base.
    fix HTML fallback for explicit templates [#2052 state:resolved]
      * There were a number of patches related to this that simply compounded
        each other. Basically none of them apply cleanly, and the underlying
        issue needs to be revisited. After discussing the underlying problem
        with Koz, we will defer these fixes for further discussion.
Commits on Apr 9, 2009
  1. @wycats
Commits on Jan 30, 2009
  1. @wycats

    Merge commit 'rails/3-0-unstable'

    wycats authored
Commits on Jan 22, 2009
  1. @wycats @josh
Commits on Dec 26, 2008
  1. @wycats
Something went wrong with that request. Please try again.