add to_s and to_i
This commit is contained in:
parent
d3e4d80ef6
commit
596a0d5723
|
@ -17,15 +17,18 @@ class ContributionsController < ApplicationController
|
|||
@contribution_rate = Hash.new
|
||||
@static_total_per_user = g.rep_stats(project_id, :rev => rev)
|
||||
@static_total_per_user.each do |static|
|
||||
uname = static.uname
|
||||
change_num = static.changes
|
||||
uname = static.uname.to_s
|
||||
change_num = static.changes.to_i
|
||||
Rails.logger.info(uname)
|
||||
Rails.logger.info(change_num)
|
||||
if @contribution_rate.has_key?(uname)
|
||||
@contribution_rate[uname] += change_num
|
||||
Rails.logger.info("has key")
|
||||
Rails.logger.info(@contribution_rate[uname])
|
||||
else
|
||||
@contribution_rate[uname] = change_num
|
||||
Rails.logger.info("does not has key")
|
||||
Rails.logger.info(@contribution_rate[uname])
|
||||
end
|
||||
count_all += change_num
|
||||
Rails.logger.info(count_all)
|
||||
|
|
Loading…
Reference in New Issue