Last active
December 22, 2015 08:09
toggle rails class caching in canvas
This file contains hidden or 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
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