Just assign the existing attachment to another record: new_photo = Photo.new new_photo.image = old_photo.image Paperclip will duplicate the file when saving...

This is more tricky than it should be because url_for, asset_path, etc. all rely on different mechanisms.

Attached (see below) is some code to allow using unobtrusive JavaScript on pages fetched with an AJAX call.

Best results in other decks

If you need to pre-generate a scram-sha256 password hash for use with postgres, e.g. for using it with...

With Ubuntu 24.04 it's not longer possible to setup FDE with BTRFS The new installer won't offer you...

Search in all decks