Earlier i was using This code
<%= select "selected_payment", "id", @shifts.map {|u| [' ' +u.start_time.strftime("%I:%M %p") + '-' + u.end_time.strftime("%I:%M %p")+' ',u.id]} %> to make a dropdown.
Now i have to do same thing with collection_select. But i'm not able to figure how to do it. It will be something like the one given below :
<%= f.collection_select :shift_id, @shifts,:id, :start_time, :prompt => true %>
I can not even format the date and use two values at the same time. Please help,Thanks in Advance