diff options
author | Michael Pearson <mipearson@gmail.com> | 2012-05-02 17:42:33 +1000 |
---|---|---|
committer | Michael Pearson <mipearson@gmail.com> | 2012-05-02 17:42:33 +1000 |
commit | 85f71c53296e2f360f723236dee7a3193db35a13 (patch) | |
tree | f86abc62e317844eb7ee162ff1eb32afb4b766e8 /guides | |
parent | b214ddd1c986a466923fd8a2f3dddff5bfe28637 (diff) | |
download | rails-85f71c53296e2f360f723236dee7a3193db35a13.tar.gz rails-85f71c53296e2f360f723236dee7a3193db35a13.tar.bz2 rails-85f71c53296e2f360f723236dee7a3193db35a13.zip |
Add note about image_tag('') issue in Asset Pipeline guide (see rails issue #3080)
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/asset_pipeline.textile | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/asset_pipeline.textile b/guides/source/asset_pipeline.textile index d79eb01ab2..010154f1d1 100644 --- a/guides/source/asset_pipeline.textile +++ b/guides/source/asset_pipeline.textile @@ -204,6 +204,8 @@ Images can also be organized into subdirectories if required, and they can be ac <%= image_tag "icons/rails.png" %> </erb> +WARNING: If you're precompiling your assets (see "In Production":#in-production below), linking to an asset that does not exist will raise an exception in the calling page. This includes linking to a blank string. As such, be careful using <tt>image_tag</tt> and the other helpers with user-supplied data. + h5. CSS and ERB The asset pipeline automatically evaluates ERB. This means that if you add an +erb+ extension to a CSS asset (for example, +application.css.erb+), then helpers like +asset_path+ are available in your CSS rules: |