for when department is nil
parent
a9083d688d
commit
1c62698fa1
|
@ -51,7 +51,7 @@ class Page < ActiveRecord::Base
|
||||||
protected
|
protected
|
||||||
|
|
||||||
def sanitize_department
|
def sanitize_department
|
||||||
self.department.gsub!(/[^\w']/, '_').gsub!(/__+/, '_')
|
self.department.to_s.gsub!(/[^\w']/, '_').gsub!(/__+/, '_')
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_author_id
|
def set_author_id
|
||||||
|
|
Reference in New Issue