diff options
Diffstat (limited to 'actionpack/lib/sprockets/helpers')
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb index c8c6c3ddd9..e1d8fccf04 100644 --- a/actionpack/lib/sprockets/helpers/rails_helper.rb +++ b/actionpack/lib/sprockets/helpers/rails_helper.rb @@ -65,6 +65,16 @@ module Sprockets end alias_method :path_to_image, :image_path # aliased to avoid conflicts with an image_path named route + def javascript_path(source) + asset_path(source) + end + alias_method :path_to_javascript, :javascript_path # aliased to avoid conflicts with an javascript_path named route + + def stylesheet_path(source) + asset_path(source) + end + alias_method :path_to_stylesheet, :stylesheet_path # aliased to avoid conflicts with an stylesheet_path named route + private def debug_assets? compile_assets? && (Rails.application.config.assets.debug || params[:debug_assets]) |