Permalink
Browse files

Fixing warnings in tests for accented tags as per Rebecca's suggestion

  • Loading branch information...
1 parent 54430d4 commit ed11777f0fb7e4c98841e1fed6b3000963511a45 @cesy cesy committed Dec 9, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/tag.rb
View
@@ -91,7 +91,7 @@ def check_synonym
if !self.new_record? && self.name_changed?
# ordinary wranglers can change case and accents but not punctuation or the actual letters in the name
# admins can change tags with no restriction
- unless User.current_user.is_a?(Admin) || (self.name.downcase == self.name_was.downcase) || (self.name.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n,'').downcase.to_s == self.name_was.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/n,'').downcase.to_s)
+ unless User.current_user.is_a?(Admin) || (self.name.downcase == self.name_was.downcase) || (self.name.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/u,'').downcase.to_s == self.name_was.mb_chars.normalize(:kd).gsub(/[^\x00-\x7F]/u,'').downcase.to_s)
self.errors.add(:name, "can only be changed by an admin.")
end
end

0 comments on commit ed11777

Please sign in to comment.