Avoid mass assignment error in spam observer
This commit is contained in:
parent
b471d757ca
commit
917d7324a6
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@ class SpamObserver < ActiveRecord::Observer
|
|||
end
|
||||
|
||||
if user.status == "active" and user.spam_score > SPAM_THRESHOLD
|
||||
user.update_attributes(:status => "suspended")
|
||||
user.update_column(:status, "suspended")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue