Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assets have a separate Thumbnail #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

calumgunn
Copy link
Contributor

Hey, all.

This has arisen on a couple of projects, but it's more pressing on an upcoming one, so after some chatting with Mathew, Jamie and Tom, there's a movement to add a 'thumbnail' to an Asset.

The use case of this is where you would like the thumbnail of an image to be beyond the scope of what Paperclip can do, compositionally.

The first commit I've pushed here adds a has_one to Asset - a recursive relationship, as seen here: http://www.rubydoc.info/github/mongoid/mongoid/master/Mongoid%2FRelations%2FCyclic%2FClassMethods%3Arecursively_embeds_one (I didn't use the recursively_embeds_one helper, because the resulting child_asset method is a bit undesirable).

Wanted to put this out to all y'all and get this one moving, as the aforementioned project is looming.

Work yet to do:

  • Add UI for adding a Thumbnail to an existing Asset

@jgwhite
Copy link
Contributor

jgwhite commented Aug 14, 2015

Interesting approach. In theory, both could appear side by side in the asset library but visually "linked" somehow.

For the Heart use case, I wonder if we could introduce a filenaming convention that automatically establishes these relationships.

i.e. if you prepare you folder of images like this:

my-cool-image.jpg
my-cool-image-thumb.jpg
my-cat-biscuits.jpg
my-cat-biscuits-thumb.jpg

and chuck them into Slices, then it will automatically setup the -thumbs with their parents.

@bensymonds bensymonds changed the title [WIP] Assets have a separate Thumbnail Assets have a separate Thumbnail Sep 25, 2015
@bensymonds bensymonds added the WIP label Sep 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants