better replacement

master
Coleman 2008-06-27 01:30:00 -05:00
parent a1277acf1d
commit ada6dd14b4
1 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,9 @@ class Page < ActiveRecord::Base
protected
def sanitize_department
self.department.to_s.gsub!(/[^\w']/, '_').gsub!(/__+/, '_')
self.department.to_s.gsub!(/[^\w']/, '_')
self.department.to_s.gsub!(/__+/, '_')
true
end
def set_author_id