Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 commands

h2. 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.css

Copyright (c) 2009 "Matt Polito":http://www.mattpolito.info, released under the MIT license