Skip to content

Instantly share code, notes, and snippets.

@cmatheson
Last active December 22, 2015 08:09
Show Gist options
  • Save cmatheson/6442941 to your computer and use it in GitHub Desktop.
Save cmatheson/6442941 to your computer and use it in GitHub Desktop.
toggle rails class caching in canvas
function toggle-class-cache() {
cfg=config/environments/development-local.rb
if grep -q config.cache_classes $cfg; then
sed -i '
/config.cache_classes/ s/true/false/
t
s/false/true/' \
config/environments/development-local.rb
else
echo "config.cache_classes = false" > $cfg
fi
grep config.cache_classes $cfg
pkill -f script/server
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment