url: http://www.github.com/bcardarella/sexy-select
clone: git://github.com/bcardarella/sexy-select.git
I have also updated the plugin to be a direct replacement for the select helper.
From:
<%= f.select :books, %w[Book_1 Book_2 Book_3], {}, {:multiple => true} %>
To:
<%= f.sexy-select :books, %w[Book_1 Book_2 Book_3], {}, {:multiple => true} %>
Some new features include a counter in the title bar... totaling the current choices. The noun is determined from the method name, but can be explicitly defined:
<%= f.sexy-select :books, %w[Book_1 Book_2 Book_3], {:counter => :both, :noun => "My Book"}, {:multiple => true} %>
Please refer to the README for a list of all options that are available. I will continue to update the plugin to further mimic the implementation of the select helper.
NOTE: If you look at the source, you'll notice that I am writing raw HTML in the plugin. I understand that this is not the 'Rails Way'. My reason for doing this is to avoid any issues with any custom FormBuilder that you may have.
This is no longer true, I've been refactoring the plugin to use some of Rails methods to generate the code. From my tests, any FormBuilders you have should not have an impact on the plugin.
Sexy-Select will also be making its 'official' debut at the Boston Ruby Group on Tuesday Aug. 12.
0 comments:
Post a Comment