I have a select list of this fashion: edit_patient.rhtml
<%= select ‘patient’, ‘status’, [[‘Unspecified’,1], [‘Researhing’,2],
[‘Needs extra person’,5],
I have enums defined in the database(mysql) for status. Storage is fine.
But on retrieval, it is always show it as Unspecified . But if i just
display status , i am getting the right string. I realized this was
happening , because returned value for status is string and hence
Selected option is of 0.
Now how do i force the retrieval to numeric context ?
forcing numeric context like status+0 doesn’t work in rails