add onchange attribute to collection_select

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

<%= 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:

http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001654