I have a category of items lets say :
- Sold
- In shop
- Coming soon
Every items are record in database as follow :
- item.category = 0 for sold
- item.category = 1 for shop
- item.category = 2 for coming soon
Today I do as follow :
<% if item.category = 0 %>Sold<% end %>
<% if item.category = 1 %>in shop<% end %>
<% if item.category = 2 %>coming soon<% end %>
Is there a way to centralize an enum for all my application so it will be available in any pages like this :
<% if SOLD %>Sold<% end %>