in my model i have this part of code for declare hard coded types
TYPES = { administrator: 1, system: 2, station: 3, guest: 4 }
def type
TYPES.key(read_attribute(:type_id))
end
def type=(s)
write_attribute(:type_id, TYPES[s])
end
i need get this 4 types on the view to show them as select box how can i get them
somthing like that
Admin.TYPES.each do |type|
"<option id="<%=????%>"><%=type.text%></option>"
end