Created
August 11, 2015 20:01
-
-
Save notyoyoma/7c20434e5563f243be3a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb | |
| index e3fd632..445478e 100755 | |
| --- a/app/helpers/application_helper.rb | |
| +++ b/app/helpers/application_helper.rb | |
| @@ -127,4 +127,15 @@ module ApplicationHelper | |
| end | |
| + def controller_assets asset_folder | |
| + if ! Dir.glob("app/assets/#{asset_folder}/#{params[:controller]}-singular.*").empty? | |
| + logger.info "ASSET: Controller specific #{asset_folder.singularize} / #{params[:controller]} found." | |
| + "#{params[:controller]}-singular" | |
| + else | |
| + logger.info "ASSET: Controller specific #{asset_folder.singularize} / #{params[:controller]} not found." | |
| + nil | |
| + end | |
| + end | |
| + | |
| + | |
| end | |
| diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb | |
| index 5fb35fb..b356f87 100755 | |
| --- a/app/views/layouts/application.html.erb | |
| +++ b/app/views/layouts/application.html.erb | |
| @@ -9,7 +9,7 @@ | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="p:domain_verify" content="dc802b645a0b68c38937e215079878c2"/> | |
| - <%= stylesheet_link_tag "application" %> | |
| + <%= stylesheet_link_tag "application", controller_assets("stylesheets") %> | |
| <!--[if gt IE 9]><!--><%= stylesheet_link_tag "css/app", :media => nil %><!--<![endif]--> | |
| <!--[if IE 9]><%= stylesheet_link_tag "css/app.blessed", :media => nil %><![endif]--> | |
| <!--[if lte IE 8]><%= stylesheet_link_tag "css/app-old-ie", :media => nil %><![endif]--> | |
| @@ -222,7 +222,7 @@ | |
| <%= javascript_include_tag "foundation/js/foundation.min" %> | |
| <![endif]--> | |
| -<%= javascript_include_tag "application" %> | |
| +<%= javascript_include_tag "application", controller_assets("javascripts") %> | |
| <script> | |
| $(document).ready(function(){ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment