Problem accessing paperclip file attributes in a callback (observer)

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) “Deleted #{attachment.user.username} :: #

The log message will say "Deleted Jsmith :: ". No attachment name
though. Thanks for any help.

Here’s a gist if you need it.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs