Я использую carrierwave и mongoid в приложении rails 3, и у меня проблема с обратным вызовом after_save. Обратите внимание на следующее
class Video
include Mongoid::Document
field :name
mount_uploader :file, VideoUploader
after_create :enqueue_for_encoding
protected
def enqueue_for_encoding
// point your encoding service to where it expects the permanent file to reside
// in my case on s3
end
end
Моя проблема в том, что в моем методе enqueue_for_encoding
file.url указывает на локальный каталог tmp, а не на каталог s3.
Как мне получить мой enqueue_for_encoding
метод, который будет вызываться, когда file.url указывает на s3?
Спасибо!
Джонатан