Merge pull request #2180 from tomciopp/master

More idiomatic approach to finding drafts
This commit is contained in:
Sam
2014-04-08 16:46:24 +10:00
11 changed files with 31 additions and 30 deletions

View File

@ -200,7 +200,7 @@ class User < ActiveRecord::Base
def approve(approved_by, send_mail=true)
self.approved = true
if Fixnum === approved_by
if approved_by.is_a?(Fixnum)
self.approved_by_id = approved_by
else
self.approved_by = approved_by