mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
Merge pull request #2180 from tomciopp/master
More idiomatic approach to finding drafts
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user