aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets/helpers
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-09-28 20:13:24 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-09-28 20:13:24 -0300
commit64b0c8888b908ede5372e0a70cb4cb8731d372ba (patch)
treed0e73d457ff98985e3a155a8cba141dfa317b585 /actionpack/lib/sprockets/helpers
parentad304e9f7e4f244eabfd42e7cd768e3b41725875 (diff)
downloadrails-64b0c8888b908ede5372e0a70cb4cb8731d372ba.tar.gz
rails-64b0c8888b908ede5372e0a70cb4cb8731d372ba.tar.bz2
rails-64b0c8888b908ede5372e0a70cb4cb8731d372ba.zip
javascript_path and stylesheet_path should honor the asset pipelining
Diffstat (limited to 'actionpack/lib/sprockets/helpers')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb10
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])