Created
April 16, 2013 15:33
-
-
Save javan/5396933 to your computer and use it in GitHub Desktop.
Toggle features in development mode by touching various tmp/*.txt files.
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
# Touch tmp/caching.txt to turn on caching | |
if Rails.root.join('tmp/caching.txt').exist? | |
config.action_controller.perform_caching = true | |
config.cache_store = :mem_cache_store | |
else | |
config.action_controller.perform_caching = false | |
config.cache_store = :null_store | |
end | |
# Touch tmp/precompile.txt to test with asset precompiles. Run | |
# RAILS_ENV=development RAILS_GROUPS=assets rake assets:precompile | |
# to compile the assets, then `touch tmp/restart.txt` | |
if Rails.root.join('tmp/precompile.txt').exist? | |
config.assets.compile = false | |
config.assets.digest = true | |
config.assets.compress = false | |
end | |
# Touch tmp/mocksmtp.txt to deliver mail to MockSMTP.app | |
if Rails.root.join('tmp/mocksmtp.txt').exist? | |
config.action_mailer.delivery_method = :smtp | |
config.action_mailer.smtp_settings = { address: 'localhost', port: 1025, domain: 'example.com' } | |
else | |
config.action_mailer.raise_delivery_errors = false | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment