From c85629d3b36837976acefeee75ef4e9aa4a2013c Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 30 Jul 2013 11:48:14 +0800 Subject: [PATCH] Fix controller js and css loading error --- app/views/layouts/back_end.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/back_end.html.erb b/app/views/layouts/back_end.html.erb index b102562af..0af047db0 100644 --- a/app/views/layouts/back_end.html.erb +++ b/app/views/layouts/back_end.html.erb @@ -5,11 +5,11 @@ <%= render 'layouts/meta' %> <%= render 'layouts/google_font' %> <%= stylesheet_link_tag "back_end" %> - <%= stylesheet_link_tag params[:controller] %> + <%= stylesheet_link_tag params[:controller] if Rails.application.assets.find_asset params[:controller] %> <%= yield :page_specific_css %> <%= render 'layouts/ie_html5_fix' %> <%= javascript_include_tag "back_end" %> - <%= javascript_include_tag params[:controller] %> + <%= javascript_include_tag params[:controller] if Rails.application.assets.find_asset params[:controller] %> <%= yield :page_specific_javascript %> <%= csrf_meta_tag %>