select in rails 2

Hi all,

Im facing problem with select in rails.

I have providers and categories..

they have a joining table providers_categories where i store both provider_id and category_id.

In new page I have the multiple select for categories while creating a provider like this.. Im using haml

= select(:provider, :provider_category_id, ProviderCategory.all.collect{|p| [p.name, p.id,]}, {}, {:multiple=>true})

But while editing, The select tag should display all the selected categories to be selected default..

I dont know how to do this..

Please help me in this..

Regards,

P.Angel