Fixed validation of workflows that use shared code

This commit is contained in:
Anton Argirov 2015-11-24 22:23:59 +06:00
parent 540319bbc8
commit 7e2a8d2771

View File

@ -155,7 +155,7 @@ class CustomWorkflow < ActiveRecord::Base
object.send :instance_variable_set, :@attachment, Attachment.new object.send :instance_variable_set, :@attachment, Attachment.new
object.send :instance_variable_set, :@page, object object.send :instance_variable_set, :@page, object
end end
CustomWorkflow.run_shared_code self CustomWorkflow.run_shared_code object
[:before_add, :after_add, :before_remove, :after_remove].each {|field| validate_syntax_for object, field} [:before_add, :after_add, :before_remove, :after_remove].each {|field| validate_syntax_for object, field}
end end
end end