Skip to content

Instantly share code, notes, and snippets.

@fanktom
Created September 21, 2012 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fanktom/3763687 to your computer and use it in GitHub Desktop.
Save fanktom/3763687 to your computer and use it in GitHub Desktop.
ScaleUp File
require 'scales/up/rails'
desc "Scale up the cache"
Scales::Up.new do |scales|
# Stylesheets
scales.push :css, :to => "/assets/application.css?body=1"
scales.push :css, :to => "/assets/scaffolds.css?body=1"
scales.push :css, :to => "/assets/tracks.css?body=1"
# Javascripts
scales.push :js, :to => "/assets/jquery.js?body=1"
scales.push :js, :to => "/assets/jquery_ujs.js?body=1"
scales.push :js, :to => "/assets/tracks.js?body=1"
scales.push :js, :to => "/assets/application.js?body=1"
# Images
scales.push :png, :to => "/assets/rails.png"
# Tracks
scales.update "/", "/tracks", "/tracks/new", :format => :html
Track.all.each{ |track| scales.update "/tracks/#{track.id}", "/tracks/#{track.id}/edit", :format => :html }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment