Forum: Ruby on Rails observe(ing)_fild a collection_select with 1 item

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
4f7fb063aecdf8344774cd7238d8b585?d=identicon&s=25 Jorge Mario G. Mazo (Guest)
on 2007-03-12 06:57
(Received via mailing list)
Hi there
I'm obseving a field (a collection select) and it work if the
collection has more than one item, if it has only one it wont change
anything here is my code

<%= collection_select 'address', 'address', @addresses, :id, :address
<%= observe_field(
              :update => 'shipping',
              :url => { :action => :shi },
              :complete => "new Effect.SlideDown('shipping')",
              :with => 'boo')  %>

As I read that obseve_fields take the same arguments of link_to_remote
i have tried :on => click
but no luck
if there is only one item in the collection it wont work

thanks in advance
Jorge Mario G. Mazo
This topic is locked and can not be replied to.