Dynamically setting Paperclip processors with attachment instance data

I’m trying to dynamically set my Paperclip processors which are stored
in my database, ideally I would want to access
attachment.instance.paperclip_processor, but I can’t seem to do that.
Any ideas?

class Post < ActiveRecord::Base

has_attached_file :image,
:path => “:rails_root/
public/:hash_path/:style/:basename.:extension”,
:processors => lambda { |attachment|
attachment.instance.paperclip_processor }
:styles => {
:thumb => [“175x175#”, :jpg],
:resized => [“800x800>”, :jpg],
}

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