Hello,
In my database for a column called 'how_get' I can have a value of 1, 2, 3 and so on... so in my view to display the data I use:
<%=h @offer.how_get %>
and I get the value displayed 1, 2.... but what I would like ti to have a hash-table with values like this:
@how_d = {'By train' => '1', 'By car' => '2'}
so instead of '1' it would display 'by train' and so on. This is an just an example and I will have many possible values in my hash-table, so I don't want to use the if statement.
Any ideas?