fix bitpref references

This commit is contained in:
r888888888
2014-06-23 18:00:31 -07:00
parent e016a5b529
commit ff86f3c298
2 changed files with 4 additions and 2 deletions

View File

@@ -53,7 +53,8 @@ class DmailsController < ApplicationController
Dmail.visible.unread.each do |x| Dmail.visible.unread.each do |x|
x.update_column(:is_read, true) x.update_column(:is_read, true)
end end
CurrentUser.user.update_column(:has_mail, false) CurrentUser.user.has_mail = false
CurrentUser.user.save
end end
private private

View File

@@ -75,7 +75,8 @@ class User < ActiveRecord::Base
end end
def unban! def unban!
update_column(:is_banned, false) self.is_banned = false
save
ban.destroy ban.destroy
end end
end end