change has_key

This commit is contained in:
nigel007 2019-06-16 09:16:55 +08:00
parent fbf5d78c6d
commit b0cadd67d5
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class ContributionsController < ApplicationController
change_num = static.changes
Rails.logger.info(uname)
Rails.logger.info(change_num)
if @contribution_rate.include?(uname)
if @contribution_rate.has_key?(uname)
@contribution_rate[uname] += change_num
else
@contribution_rate[uname] = change_num