Inlining assets in layout
<style media="screen"><%= sprockets.find_asset('screen.css').to_s %></style>
<style media="print"><%= sprockets.find_asset('print.css').to_s %></style>
<script><%= sprockets.find_asset('all.js').to_s %></script>
inline to minify assets in html tags. If possible I would also gzip html file. In my case gzip saved 200kB when I activated it for API documentation.
configure :build do
activate :minify_css, inline: true
Don't forget to ignore assets during build process. It's waste of time to build assets that are inlined. You can ignore assets directories in config.rb or use ignored directories for assets. I prefer the latter.
# ignore (public) assets directory
set :css_dir, 'assets/css'
set :js_dir, 'assets/js'
# OR use excluded assets directories
set :css_dir, 'assets/_css'
set :js_dir, 'assets/_js'