2013-03-08 40 views

回答

1

您可以添加檢查您的deactivated領域active_for_authentication?方法是這樣的:

def active_for_authentication? 
    super && !deactivated? 
end 
+0

謝謝,工作就像一個魅力!以防萬一有人試圖在「用戶」模型中實現代碼的放置位置。 – 2013-05-21 19:55:14