mirror of
https://github.com/kemko/paperclip.git
synced 2026-01-01 16:05:40 +03:00
Загружаем файлы в after_commit, а не в after_save
This commit is contained in:
@@ -220,7 +220,7 @@ module Paperclip
|
||||
attachment_definitions[name] = Attachment.build_class(name, options)
|
||||
const_set("#{name}_attachment".camelize, attachment_definitions[name])
|
||||
|
||||
after_save :save_attached_files
|
||||
after_commit :save_attached_files
|
||||
after_commit :destroy_attached_files, on: :destroy
|
||||
after_commit :flush_attachment_jobs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user