User after_commit in stead of after_save

This commit is contained in:
2018-05-05 20:24:35 -03:00
parent 3a993efaa6
commit f795c28c5a
+1 -1
View File
@@ -32,7 +32,7 @@ module Dunlop::SourceFileModel
event(:failed) { transition any => :failed }
end
after_create { autoload! }
after_commit { autoload! }
self::Job = Class.new "#{name.deconstantize}::ApplicationJob".constantize do
def perform(source_file_id)