Ruby: A Kindler, Gentler Flow Control for Beta Sites

0
117
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.

https://gist.github.com/thehashrocket/6e0642b8c9cc774b05785fefa6d8775b.js