Forum: Ruby on Rails Array of strings for select input - how to display it later?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F639e0cdf2fa098b535d6ec766b2aee1?d=identicon&s=25 Szymon Nowak (g0nzo)
on 2006-03-03 11:30
Hi!

I've prepared simple array in my model
(i.e. TYPE = [["very_long_string", "vls"]...])
which i use for select input element in form.

If i choose "very_long_string", "vls" is saved to database.
How to later read the whole string, not the shorter form? If i make in a
view:
<%= @object.column %> i get "vls".

BTW. Will (or does) rails support mysql ENUM data type? When i created a
table with this type, "rake db_schema_dump" didn't work.
This topic is locked and can not be replied to.