fix for parent:none and parent:0

This commit is contained in:
albert
2011-11-01 18:01:17 -04:00
parent 3136d3c74c
commit 97520bd01b

View File

@@ -478,6 +478,9 @@ class Post < ActiveRecord::Base
def apply_metatags(tags)
tags.each do |tag|
case tag
when /^parent:none$/, /^parent:0$/
self.parent_id = nil
when /^parent:(\d+)$/
self.parent_id = $1.to_i