Remove Post#validate_parent_does_not_have_a_parent method (#3206).

Not used; posts are allowed to have grandparents.
This commit is contained in:
evazion
2017-07-14 17:49:12 -05:00
parent 45676491ff
commit 4ead45a787

View File

@@ -1306,13 +1306,6 @@ class Post < ApplicationRecord
end
end
def validate_parent_does_not_have_a_parent
return if parent.nil?
if !parent.parent.nil?
errors.add(:parent, "can not have a parent")
end
end
def update_parent_on_destroy
Post.update_has_children_flag_for(parent_id) if parent_id
end