diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index 62d5b77..ede9da5 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -7,7 +7,7 @@ * * You're free to add application-wide styles to this file and they'll appear at the top of the * compiled file, but it's generally better to create a new file per style scope. - * + *= require bootstrap *= require_self *= require_tree . */ diff --git a/config/application.rb b/config/application.rb index 8254520..388cf54 100644 --- a/config/application.rb +++ b/config/application.rb @@ -64,5 +64,21 @@ class Application < Rails::Application # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + + # config.assets.compile = true + # config.assets.precompile += %w(*.png *.jpg *.jpeg *.gif*.js, *.css, *.css.erb, *.sass) + initializer 'setup_asset_pipeline', :group => :all do |app| + # We don't want the default of everything that isn't js or css, because it pulls too many things in + app.config.assets.precompile.shift + + # Explicitly register the extensions we are interested in compiling + app.config.assets.precompile.push(Proc.new do |path| + File.extname(path).in? [ + '.html', '.erb', '.haml', # Templates + '.png', '.gif', '.jpg', '.jpeg', # Images + '.eot', '.otf', '.svc', '.woff', '.ttf', # Fonts + ] + end) + end end end