Displaying 1 result from an estimated 1 matches for "img_3".
Did you mean:
img3
2007 Mar 04
3
Dynamically setting the image directory used by attachment_fu
...attachment_fu so I figure I would just post this here.
I didn''t like the way attachment_fu by default creates directories
under a given directory for a specific class e.g.
item_image/1/img_1.jpg
item_image/1/img_1_thumb.jpg
item_image/2/img_2.jpg
item_image/2/img_2_thumb.jpg
item_image/3/img_3.jpg
item_image/3/img_3_thumb.jpg
After a while you end up with ton of directories under the item_image
directory. Instead I wanted the images to be grouped by the item
object which has_many item_images. You can do that by adding the
following two methods to the item_image object.
# Make sure the...