fix for parent:none and parent:0
This commit is contained in:
@@ -478,6 +478,9 @@ class Post < ActiveRecord::Base
|
|||||||
def apply_metatags(tags)
|
def apply_metatags(tags)
|
||||||
tags.each do |tag|
|
tags.each do |tag|
|
||||||
case tag
|
case tag
|
||||||
|
when /^parent:none$/, /^parent:0$/
|
||||||
|
self.parent_id = nil
|
||||||
|
|
||||||
when /^parent:(\d+)$/
|
when /^parent:(\d+)$/
|
||||||
self.parent_id = $1.to_i
|
self.parent_id = $1.to_i
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user