Skip to content

Instantly share code, notes, and snippets.

@djgraham
Created March 4, 2011 10:47
Show Gist options
  • Select an option

  • Save djgraham/854454 to your computer and use it in GitHub Desktop.

Select an option

Save djgraham/854454 to your computer and use it in GitHub Desktop.
Shove a quick black banner at the top of your page when you're on a server other than production...
<% if Rails.env != "production" %>
<div id="staging-server" style="background: #000; text-align: center; color: #FFF; font-size: 16px; font-weight: bold; text-transform: none; padding: 10px 0;">You are currently using the <%= Rails.env.capitalize %> server</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment