Read more

Rails Env Widget

Dominik Schöler
June 27, 2016Software engineer at makandra GmbH

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

Save the attached file to app/helpers/ and use the widget in your layout like this:

%body
  = rails_env_widget unless Rails.env.production?

It'll render a small light gray box in the top left corner of your screen, containing the current Rails environment. On click, it'll disappear. Actually, it has the same UX as our Query Diet widget Show archive.org snapshot .

Posted by Dominik Schöler to makandra dev (2016-06-27 08:10)