DEV: Prefer public_send over send.

This commit is contained in:
Guo Xiang Tan
2019-05-07 09:27:05 +08:00
parent 9be70a22cd
commit 152238b4cf
74 changed files with 216 additions and 129 deletions

View File

@ -351,7 +351,7 @@ class User < ActiveRecord::Base
def self.unstage(params)
if user = User.where(staged: true).with_email(params[:email].strip.downcase).first
params.each { |k, v| user.send("#{k}=", v) }
params.each { |k, v| user.public_send("#{k}=", v) }
user.active = false
user.unstage
end