This commit is contained in:
Toks
2014-06-15 15:09:21 -04:00
parent c48f03a926
commit 39197cb61f

View File

@@ -64,8 +64,8 @@ class Upload < ActiveRecord::Base
def rating_given
if rating.present?
return true
elsif tag_string =~ /(?:\s|^)rating:[qse](?:\s|$)/i
self.rating = "q" # Dummy just so the upload can be created. The metatag will set the correct rating on the post after upload.
elsif tag_string =~ /(?:\s|^)rating:([qse])/i
self.rating = $1.downcase
return true
else
self.errors.add(:base, "Must specify a rating")