From 1c62698fa132379ac3c09145982f0be2c5458ef5 Mon Sep 17 00:00:00 2001 From: Coleman Date: Fri, 27 Jun 2008 01:24:04 -0500 Subject: [PATCH] for when department is nil --- app/models/page.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/page.rb b/app/models/page.rb index 2bb80c5..9c01b67 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -51,7 +51,7 @@ class Page < ActiveRecord::Base protected def sanitize_department - self.department.gsub!(/[^\w']/, '_').gsub!(/__+/, '_') + self.department.to_s.gsub!(/[^\w']/, '_').gsub!(/__+/, '_') end def set_author_id