collection_select

_form.html.haml   = f.label :Select_Brand, "Select_Brand<em>*</em>".html_safe   = collection_select(:brand_name, :brand_id, Brand.all, :id, :name, :prompt => "Select a Brand" )

show.html.haml file %table   %tr     %td       Brand_Name :     %td       = @message.brand_id

After writing this code I am not able to see the brand name. Its not giving any error but its giving blank field

I don't think there should be any issue with this syntax then also you can try this one f.collection_select(:brand_id, Brand.all, :id, :name, :include_blank => "Select a Brand" )