aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorSam Pohlenz <sam@sampohlenz.com>2009-09-03 14:00:40 -0500
committerJoshua Peek <josh@joshpeek.com>2009-09-03 14:01:01 -0500
commit4b6321efa9be103ca1e00c13dd9d955b076dd31e (patch)
treebd542c0821ae419ba61ea2d38d5f5e9a7aebdc27 /actionpack/lib/action_view/helpers
parentf61dc0ef6511e585f0b6a8d02b00c17b2388b04a (diff)
downloadrails-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/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb8
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