Ruby: A Kindler, Gentler Flow Control for Beta Sites

Jonny Lew at Pexels

When you’re working with beta sites, it’s commonplace to have <% if else %> blocks in your views for code that shouldn’t be seen in the live site. Did you know that there is a better way to handle that, though? Make use of of Rails `before_action` function and step into a whole new world of flow control.