mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
f24734a7e1
As a follow-up to https://github.com/rails/rails/pull/37872, this change introduces a class_names view helper to make it easier to conditionally apply class names in views. Before: <div class="<%= item.for_sale? ? 'active' : '' %>"> After: <div class="<%= class_names(active: item.for_sale?) %>"> We've been using this helper in the GitHub monolith since 2016. Co-authored-by: Aaron Patterson <tenderlove@github.com> |
||
---|---|---|
.. | ||
actionpack | ||
activerecord | ||
fixtures | ||
lib | ||
template | ||
ujs | ||
abstract_unit.rb | ||
active_record_unit.rb |