View helper to simplify conditional class in view.
Add this line to your application's Gemfile:
gem 'klassnames'
div(class=classnames("one", "two", three: true))
=> <div class="one two three"></div>
The gem is available as open source under the terms of the MIT License.