Jeremy Woertink wrote:
> So some of my images look like
>
> thumb.jpg, small.jpg, large.jpg
>
> and some look like
>
> thumb_23432S.jpg, small_643563456.jpg, large_2123425F.jpg
>
> I want them all to look like the first set, so this would take care of
> that problem?
So there is a mixture of files with the old path and files with the new
path? That will be more complicated, you'll have to check that the old
file exists at the old path before trying to do the move.
old_complete_path = File.join(old_path, old_file)
if File.exist?(old_complete_path)
# Do your moving and directory making
else
# This is 'new' content and is already in the correct place
next
end
>
> I also have the issue of some of the images being `original.JPG`
That is the easy part, you would change the new_file interpolation to:
new_file = "#{style}#{extension.downcase}"
- Parker
--
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.