diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-02-05 00:46:07 -0800 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2012-02-05 00:46:07 -0800 |
commit | a9bebaedb9c067397965806bf4153c9165d1b7ef (patch) | |
tree | 626019e59c940af5eaba30e0e84acfcfd6ed23d7 /railties | |
parent | 20bc3d4aaa2ee13667b14cc20e2c31c32ef7489e (diff) | |
parent | bcd3b870cea567ffc626144a0292fba7797a4c78 (diff) | |
download | rails-a9bebaedb9c067397965806bf4153c9165d1b7ef.tar.gz rails-a9bebaedb9c067397965806bf4153c9165d1b7ef.tar.bz2 rails-a9bebaedb9c067397965806bf4153c9165d1b7ef.zip |
Merge pull request #4875 from sikachu/master-asset-url
Add *_url helpers to get the full assets URL
Diffstat (limited to 'railties')
-rw-r--r-- | railties/guides/source/action_view_overview.textile | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/railties/guides/source/action_view_overview.textile b/railties/guides/source/action_view_overview.textile index ac5c9fa4d8..3b0fbfb464 100644 --- a/railties/guides/source/action_view_overview.textile +++ b/railties/guides/source/action_view_overview.textile @@ -585,6 +585,14 @@ Computes the path to an image asset in the +public/images+ directory. Full paths image_path("edit.png") # => /images/edit.png </ruby> +h5. image_url + +Computes the url to an image asset in the +public/images+ directory. This will call +image_path+ internally and merge with your current host or your asset host. + +<ruby> +image_url("edit.png") # => http://www.example.com/images/edit.png +</ruby> + h5. image_tag Returns an html image tag for the source. The source can be a full path or a file that exists in your +public/images+ directory. @@ -629,6 +637,14 @@ Computes the path to a JavaScript asset in the +public/javascripts+ directory. I javascript_path "common" # => /javascripts/common.js </ruby> +h5. javascript_url + +Computes the url to a JavaScript asset in the +public/javascripts+ directory. This will call +javascript_path+ internally and merge with your current host or your asset host. + +<ruby> +javascript_url "common" # => http://www.example.com/javascripts/common.js +</ruby> + h5. stylesheet_link_tag Returns a stylesheet link tag for the sources specified as arguments. If you don't specify an extension, +.css+ will be appended automatically. @@ -659,6 +675,14 @@ Computes the path to a stylesheet asset in the +public/stylesheets+ directory. I stylesheet_path "application" # => /stylesheets/application.css </ruby> +h5. stylesheet_url + +Computes the url to a stylesheet asset in the +public/stylesheets+ directory. This will call +stylesheet_path+ internally and merge with your current host or your asset host. + +<ruby> +stylesheet_url "application" # => http://www.example.com/stylesheets/application.css +</ruby> + h4. AtomFeedHelper h5. atom_feed |