Best solution in Rails for a 'image selector'? -
i'm working on project similar blog posts have several associated images. i've been conflicted few days best way this, , wondering if there good, standard way of doing or if had better ideas mine far.
one option came use simple form f.association combined bootstrap plugin, imagepicker, seems messy , doesn't have solution adding new images except create separate form, link it, save current form in session, , redirect saved form after creating new image.
the other option think of render association partials, , include edit/delete links on the partials conditionals show when needed, again needs same solution creating new images, , doesn't handle case user has collection of images , images linked posts via habtm relationship well.
so, better ideas?
for similar problem, solution decided on:
i used simple form f.association pick associated images, moved else out image controller build sort of 'image manager' similar wordpress has. put image manager in ajax modal didn't lose current form data, upon submitting ajax form, used jquery update pictures options on first form.
Comments
Post a Comment