Skip to content

Commit

Permalink
Resolves #133, allowed parent= for records returning true for blank?/…
Browse files Browse the repository at this point in the history
…empty?
  • Loading branch information
Stefan Kroes committed May 7, 2013
1 parent 6bf9382 commit 4c38dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ancestry/instance_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def cache_depth

# Parent
def parent= parent
write_attribute(self.base_class.ancestry_column, if parent.blank? then nil else parent.child_ancestry end)
write_attribute(self.base_class.ancestry_column, if parent.nil? then nil else parent.child_ancestry end)
end

def parent_id= parent_id
Expand Down

0 comments on commit 4c38dd1

Please sign in to comment.