S
Sven Schwyn
Hi there
When fiddling together CSS classes in html_options of my form helpers, I
sometimes have code looking something like the following:
html_options.merge!
class => "list_item" + ((options[:class_method])?("
list_item_#{object.send(options[:class_method])}")
'')))
The "('')" is pretty ugly, so I'm wondering if there's a more rubyish
way to write this.
Thanks for your hints, -sven
When fiddling together CSS classes in html_options of my form helpers, I
sometimes have code looking something like the following:
html_options.merge!
list_item_#{object.send(options[:class_method])}")
The "('')" is pretty ugly, so I'm wondering if there's a more rubyish
way to write this.
Thanks for your hints, -sven