ファイルをアップロードしたら、モデルを保存する前にそのファイルを開くことはできますか?
/public フォルダーにファイルを保存するために Paperclip を使用しています。
class Book < ActiveRecord::Base
before_save :open_it
has_attached_file :upload
def open_it
a_file = open(upload.url) # this doesn't work before save ?
# ...
end
end