我按照下面的方式执行此操作,但它返回“无文本”。如何在载波中正确访问模型?
photo_uploader.rb
process :poster
def poster
manipulate! format:"jpg" do |source|
txt = Magick::Draw.new
txt.pointsize = 20
txt.gravity = Magick::SouthGravity
txt.fill = "white"
source.border(50, 50, "black").annotate(txt, 0, 0, 0, 0, "#{model.title}" )
end
end