Last active
December 15, 2015 01:39
-
-
Save jarmo/5181489 to your computer and use it in GitHub Desktop.
This file contains 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
# application.html.erb | |
<%= stylesheet_link_tag "vendor", :media => "all" %> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "vendor" %> | |
<%= javascript_include_tag "application" %> |
This file contains 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
# application.html.erb | |
<%= stylesheet_link_tag "vendor", :media => "all", :debug => false %> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "vendor", :debug => false %> | |
<%= javascript_include_tag "application" %> |
This file contains 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
# config/environments/production.rb | |
SlowAssets::Application.configure do | |
config.assets.precompile += %w( vendor.js vendor.css ) | |
# ... | |
end |
This file contains 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
rails g controller slow index | |
create app/controllers/slow_controller.rb | |
route get "slow/index" | |
... |
This file contains 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
C:\Projects\Ruby>rails new slow-assets | |
create | |
create README.rdoc | |
create Rakefile | |
... |
This file contains 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
cd slow-assets | |
rails s | |
=> Booting WEBrick | |
=> Rails 3.2.11 application starting in development on http://0.0.0.0:3000 |
This file contains 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
# Gemfile | |
gem 'bootstrap-sass' | |
gem 'jquery-ui-rails' | |
# application.js | |
//= require jquery.ui.all | |
//= require bootstrap | |
# application.css | |
@import "bootstrap"; | |
@import "bootstrap-responsive"; | |
# bundle install and restart the server |
This file contains 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
# application.js | |
//= require_tree . | |
# vendor/assets/javascripts/vendor.js | |
//= require jquery | |
//= require jquery_ujs | |
//= require jquery.ui.all | |
//= require bootstrap | |
# application.css | |
/* | |
*= require_self | |
*= require_tree . | |
*/ | |
# vendor/assets/stylesheets/vendor.css | |
@import "bootstrap"; | |
@import "bootstrap-responsive"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment