I have mongoid and carrierwave-mongoid gems in my project (for avatars
in user model) and need timestamps in uploaded images URL. I know
there is Wiki page for this (
https://github.com/jnicklas/carrierwave/
wiki/How-to%3A-Use-a-timestamp-in-file-names) but there is note "This
does not seem to be reliable. I'd strongly recommend saving the
timestamp to the database and reading it from the model to generate
the filename instead of using this method." and I'm not sure how to do
that.
I think Rails should generate timestamps for images URL automatically
or from specific attribute right? So I'm not sure what is the right
name for this attribute or what is the right approach for this with
Mongoid and carrierwave-mongoid.
Could you please provide me some info or link where I can found more
about this or info about the solution.
Because my repo on GitHub is private I did this Gist (https://
gist.github.com/2355128) where you can see my user model and avatar
uploader.
Thanks for your help.