Add a field for the filename in the model object. populate this with the name of the file uploaded that you'd otherwise put in to the database.
An alternative is to store the files in the database as a blob, but what if your database is then full of 20Mb rows? P On Oct 11, 2011 2:30 AM, "Rodrigo Ruiz" <[email protected]> wrote: > Hi, I'd like to know what is the easiest and best way to save images > and videos (both plural) into a model. > > Also I'd like to know how to upload and change those videos and images > with the active admin gem for an admin interface (the admin is the > only one that will access this model). > > Thank you, > Rodrigo > > -- > 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. > > -- 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.

