This commit is contained in:
Toks
2013-08-08 15:44:46 -04:00
parent 6734ccfad1
commit c829b78c25

View File

@@ -397,7 +397,7 @@ class Post < ActiveRecord::Base
def filter_metatags(tags) def filter_metatags(tags)
@pre_metatags, tags = tags.partition {|x| x =~ /\A(?:rating|parent):/i} @pre_metatags, tags = tags.partition {|x| x =~ /\A(?:rating|parent):/i}
@post_metatags, tags = tags.partition {|x| x =~ /\A(?:-pool|pool|fav):/i} @post_metatags, tags = tags.partition {|x| x =~ /\A(?:-pool|pool|newpool|fav):/i}
apply_pre_metatags apply_pre_metatags
return tags return tags
end end
@@ -420,6 +420,10 @@ class Post < ActiveRecord::Base
add_pool!(pool) if pool add_pool!(pool) if pool
when /^pool:(.+)$/i when /^pool:(.+)$/i
pool = Pool.find_by_name($1)
add_pool!(pool) if pool
when /^newpool:(.+)$/i
pool = Pool.find_by_name($1) pool = Pool.find_by_name($1)
if pool.nil? if pool.nil?
pool = Pool.create(:name => $1, :description => "This pool was automatically generated") pool = Pool.create(:name => $1, :description => "This pool was automatically generated")