diff options
author | Sam Pohlenz <sam@sampohlenz.com> | 2009-09-03 14:00:40 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-09-03 14:01:01 -0500 |
commit | 4b6321efa9be103ca1e00c13dd9d955b076dd31e (patch) | |
tree | bd542c0821ae419ba61ea2d38d5f5e9a7aebdc27 /actionpack/lib | |
parent | f61dc0ef6511e585f0b6a8d02b00c17b2388b04a (diff) | |
download | rails-4b6321efa9be103ca1e00c13dd9d955b076dd31e.tar.gz rails-4b6321efa9be103ca1e00c13dd9d955b076dd31e.tar.bz2 rails-4b6321efa9be103ca1e00c13dd9d955b076dd31e.zip |
Don't raise exceptions for missing javascript_include_tag or stylesheet_link_tag sources unless the :cache or :concat options are given. [#2738 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/asset_tag_helper.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index c71840d41f..6b00e7afb5 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -286,7 +286,9 @@ module ActionView end javascript_src_tag(joined_javascript_name, options) else - ensure_javascript_sources!(expand_javascript_sources(sources, recursive)).collect { |source| javascript_src_tag(source, options) }.join("\n") + sources = expand_javascript_sources(sources, recursive) + ensure_javascript_sources!(sources) if cache + sources.collect { |source| javascript_src_tag(source, options) }.join("\n") end end @@ -435,7 +437,9 @@ module ActionView end stylesheet_tag(joined_stylesheet_name, options) else - ensure_stylesheet_sources!(expand_stylesheet_sources(sources, recursive)).collect { |source| stylesheet_tag(source, options) }.join("\n") + sources = expand_stylesheet_sources(sources, recursive) + ensure_stylesheet_sources!(sources) if cache + sources.collect { |source| stylesheet_tag(source, options) }.join("\n") end end |