Skip to content
Helper to simplify conditional CSS classes in Ruby on Rails views.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
log
spec
.gitignore
.rspec
.travis.yml
Gemfile
LICENSE.txt
README.md
Rakefile
klassnames.gemspec

README.md

Klassnames

Build Status

View helper to simplify conditional class in view.

Installation

Add this line to your application's Gemfile:

gem 'klassnames'

Usage

  div(class=classnames("one", "two", three: true))
  => <div class="one two three"></div>

License

The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.