Add onchange attribute to collection_select

I am creating a dropdown list with the follwoing code which work

<%= f.collection_select (:building_id,
@buildings, :id , :build_title , :prompt => “select”) %>

but i want to use ONCHANGE attribute to it how will i do this ,
please help i am new to RoR

Perhaps observe_field method helps you:

2010/1/24 M I R [email protected]

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected][email protected]
For more options, visit this group at

Bruno Grasselli

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs