Made a rails patch that improves the behavior of some form helper methods. I’m proud!
The syntax of the select helpers is annoying! It is
collection_select(:category_id, @categories, 'id', 'title', {}, :class => "cool")
Two option hashes! Noone likes that, not even Jeremy Kemper (first follow-up). I made my first evah patch, and submitted it!
http://dev.rubyonrails.org/ticket/10233
It lets you:
collection_select(:category_id, @categories, 'id', 'title', :html => {:class => "cool"})
Just like form_for
. And it avoids with_options
getting screwed up, too.
It’s even backwards compatible, thanks to some haxx *args-parsing.