I’m having trouble accessing paperclip file attributes in an
after_destroy callback on my attachment model. I can’t seem to access
the paperclip-managed attributes but I can access non-paperclip
attributes. Here’s an example:
class AttachmentObserver < ActiveRecord::Observer
def after_destroy(attachment)
attachment.logger.info “Deleted #{attachment.user.username} :: #
{attachment.name}”
end
end
The log message will say "Deleted Jsmith :: ". No attachment name
though. Thanks for any help.
Here’s a gist if you need it.