Commit db5b2d19 by ray

pass test and fix the has one could not restore problem

parent bd105ea6
......@@ -114,6 +114,10 @@ module Paranoia
end
end
end
if association_data.nil? && association.macro.to_s == "has_one"
Object.const_get(association.name.to_s.camelize).only_deleted.where("#{self.class.name.to_s.underscore}_id", self.id).first.try(:restore, recursive: true)
end
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment