Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mattpolito/environment_flag
Adds an indicator to page that shows what environment your app is currently running
https://github.com/mattpolito/environment_flag
Last synced: 12 days ago
JSON representation
Adds an indicator to page that shows what environment your app is currently running
- Host: GitHub
- URL: https://github.com/mattpolito/environment_flag
- Owner: mattpolito
- License: mit
- Created: 2009-03-17T05:41:01.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2009-03-17T05:43:06.000Z (almost 16 years ago)
- Last Synced: 2024-10-04T20:41:07.027Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 78.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
- License: MIT-LICENSE
Awesome Lists containing this project
README
h1. EnvironmentFlag
Here goes my first attempt at a plugin... take it easy on me!
Environment flag presents a constant in your face notification for the environment of your display page.
This came out of necessity as my company is always jumping around from development, staging, demo, and
production environments. This can get confusing when you have multiple instances of your site open and are
not sure which environment you're actually looking at. The Environment Flag will display on all environments
except production.It's not a lot of work to do manually but after using it on all of my sites... it's nice to finally have it
available in just a few commandsh2. Example
* Just add this simple tag anywhere in your layout:
<%= render_environment_flag %>
__I usually prefer directly under the body tag.__
* You can also add your own message:
<%= render_environment_flag("Am I really in the #{Rails.env} environment?") %>
* Style as necessary. I have included a basic style example in /example/example.cssCopyright (c) 2009 "Matt Polito":http://www.mattpolito.info, released under the MIT license