RubyFlow The Ruby and Rails community linklog

A cleaner way to set conditional CSS classes on 'link_to'

Using inspiration from React, there’s finally a more elegant way to set multiple conditional CSS classes on link_to and other Rails tag helpers which take a :class option. No more string interpolation and messy logic in the views. http://www.carlosramireziii.com/a-cleaner-way-to-set-multiple-conditional-css-classes-for-link-to.html

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in