I’m using mailboxer gem and I don’t know how to use it with Paperclip (Message Class).
Using Paperclip with a User class is:
class User < ActiveRecord::Base
has_attached_file :picture
end
How can I add has_attached_file to the Message class (there is no message.rb in models)?
Thank you.
Two solutions:
use the built-in attachment made with carrierwave (source)
monkey patch the
Messagemodel:in an initializer do:
And don’t forget migrations!