Skip to content

Commit

Permalink
Do not include asset if the file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgibson committed May 25, 2015
1 parent 41f6163 commit 984c059
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/views/layouts/resque_web/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
<%= stylesheet_link_tag "resque_web/application", :media => "all" %>
<%=
ResqueWeb::Plugins.plugins.collect do |p|
stylesheet_link_tag "#{p.name.underscore.downcase}/application"
if Rails.application.assets.find_asset("#{p.name.underscore.downcase}/application.css")
stylesheet_link_tag "#{p.name.underscore.downcase}/application"
end
end.join("\n").html_safe
%>
<%= javascript_include_tag "resque_web/application" %>
<%=
ResqueWeb::Plugins.plugins.collect do |p|
javascript_include_tag "#{p.name.underscore.downcase}/application"
if Rails.application.assets.find_asset("#{p.name.underscore.downcase}/application.js")
javascript_include_tag "#{p.name.underscore.downcase}/application"
end
end.join("\n").html_safe
%>
<%= csrf_meta_tags %>
Expand Down

0 comments on commit 984c059

Please sign in to comment.