OK, next time I will code before I ask... Writing the simple
options_for_select_from_objects_with_none helped me find what is
probably the right way to do it with existing helpers:

       <% h.select('room_id', h.options_for_select([['No room', '']])
+ h.options_for_select_from_objects(c.rooms, 'name', value_attr='id'))
%>

Compared to using options_for_select_from_objects_with_none, it is not
that different. And in this example, it's even 2 characters shorter:

       <% h.select('room_id',
h.options_for_select_from_objects_with_none(c.rooms, 'name',
def_name='No room', def_value='', value_attr='id')) %>

Sorry about the noise ^^;

Cheers,

--
Yves-Eric


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to