-
-
Save Intrepidd/af2bb4ed825817ecb044a5e93fc52f4d to your computer and use it in GitHub Desktop.
This file contains 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
# Add color coding based on Rails environment for safety | |
# edited by cveneziani | |
if defined? Rails | |
banner = if Rails.env.production? || Rails.env.staging? | |
"\e[41;97;1m #{Rails.env} \e[0m " | |
else | |
"\e[42;97;1m #{Rails.env} \e[0m " | |
end | |
Pry.config.prompt_name = banner | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sam same, I didn't know about pry prompts. I discovered the
prompt_name
while investigating the stack level too deep 😃