Permalink
Browse files

Add documentation for asset_prefix and asset_environment

(cherry picked from commit 21344bc)
  • Loading branch information...
1 parent add63ee commit b494b5cf9db8090fe3e1041c6e0a83024b2f2da8 @spohlenz spohlenz committed Jul 3, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -79,10 +79,19 @@ def debug_assets?
params[:debug_assets] == 'true'
end
+ # Override to specify an alternative prefix for asset path generation.
+ # When combined with a custom +asset_environment+, this can be used to
+ # implement themes that can take advantage of the asset pipeline.
+ #
+ # If you only want to change where the assets are mounted, refer to
+ # +config.assets.prefix+ instead.
def asset_prefix
Rails.application.config.assets.prefix
end
+ # Override to specify an alternative asset environment for asset
+ # path generation. The environment should already have been mounted
+ # at the prefix returned by +asset_prefix+.
def asset_environment
Rails.application.assets
end

0 comments on commit b494b5c

Please sign in to comment.