Heya, Setting condition classes is a huge pain in rails at the moment, or maybe i am missing it but i can't see to find it. borrowed from react components kind of style.
I want something like this (the class selected is only added if the value is true) link_to("Homepage", root_path, class: {selected: selected?}) -> a href class="selected" and other You can do the same thing to add multiple classes too link_to("Hello", root_path, class: {class: {btn:true, selected: selected?}} I think this would be awesome, anything reasons why we shouldn't implement this? Cheers, - Emile -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.