Displaying 1 result from an estimated 1 matches for "find_all_by_is_suppli".
Did you mean:
find_all_by_is_supplier
2006 Apr 12
0
Select Collection with Conditions - May Help You...
...an option collection that was filtered (in other words,
I didn''t want every item from the collection, just the ones that met a
certain criteria).
I used find_all_by_ to do it and it looks like this in my view:
<% select ''deal'', ''supplier'', Client.find_all_by_is_supplier(true,
:order => ''name'').collect { |c| [c.name, c.id] } %>
Note the sort order as well. Hope this helps someone...
Cheers,
David
--
Posted via http://www.ruby-forum.com/.