Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Changeset [49bc6a249e2a200216f8a96c36093a2c7a471c9b] by Craig R Webster

Revision 49bc6a249e2a200216f8a96c36093a2c7a471c9b, committed by Craig R Webster · March 29th, 2010 @ 02:35 AM

Allow customisation of asset path generation using a proc.

Set config.action_controller.asset_path_template to a proc that takes one
argument - the direct, unchanged asset path - and returns a path to that asset
using the scheme that your assets require.

This is useful if you have a setup which scales by introducing new application
servers where the mtime of the asset files may not be the same as those of the
asset files on your previous servers, but it does require your web servers to
have knowledge of the asset template paths that you rewrite to so it's not
suitable for out-of-the-box use. An example of configuring asset path
generation and rewriting these paths using Apache is included in
actionpack/lib/action_view/helpers/asset_tag_helper.rb.

Signed-off-by: wycats wycats@gmail.com
http://github.com/rails/rails/commit/49bc6a249e2a200216f8a96c36093a...

3 changed files

  • M actionpack/lib/action_view/helpers/asset_tag_helper.rb
  • M actionpack/test/template/asset_tag_helper_test.rb
  • M railties/guides/source/configuring.textile