Skip to content

Commit

Permalink
removal of nil before remove_children
Browse files Browse the repository at this point in the history
  • Loading branch information
jameswnl committed Feb 23, 2018
1 parent fb9e78a commit 4289d2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/mixins/relationship_mixin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def remove_parent(parent)
end

def remove_children(*child_objs)
child_objs = child_objs.flatten
child_objs = child_objs.flatten.compact
return child_objs if child_objs.empty?

child_rels = self.child_rels
Expand Down

0 comments on commit 4289d2f

Please sign in to comment.