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

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

On May 18, 6:28 pm, Scott Holland <[email protected]> wrote:
> wow, I didn't expect such a response!
>
> Maybe I should be storing this data in the db like I am at the moment,
> it just seem a bit overkill to have a table with:
>
> Image_type
> 1 => Photo
> 2 => Document
> 3 => Print
>
> There *must* be some way I can define these values in the application
> and still have all the associations work?
>
> Thanks
> --
> Posted viahttp://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 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
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