lib/drafting/instance_methods.rb in drafting-0.4.2 vs lib/drafting/instance_methods.rb in drafting-0.5.0

- old
+ new

@@ -5,10 +5,11 @@ draft = Draft.find_by_id(self.draft_id) || Draft.new draft.data = dump_to_draft draft.target_type = self.class.name - draft.user = user + draft.user_id = user.try(:id) + draft.user_type = user.try(:class).try(:name) draft.parent = self.send(self.class.draft_parent) if self.class.draft_parent result = draft.save self.draft_id = draft.id if result result