Sharagoz wrote:
> You are right, creating a database table for something like this does
> feel like overkill. Personally, I often use constants if it's a very
> small amount of data.
> 
> class Image
>   VALID_IMAGE_TYPES = ['png', 'gif', 'jpg']
> end
>

Good idea.

> or
> IMAGE_TYPES = {:1 => 'Photo', :2 => 'Document', :3 => 'Print'}

Not a good idea -- why use :1, :2, :3 instead of actual numbers or 
symbolic keys?

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to