Merge remote-tracking branch 'origin/develop' into develop

chromesetting
杨树明 5 years ago
commit 611ef62230

@ -27,7 +27,7 @@ class HacksController < ApplicationController
# 筛选过滤与排序 # 筛选过滤与排序
params_filter_or_order params_filter_or_order
# 我解决的编程题数 # 我解决的编程题数
user_codes = HackUserLastestCode.mine(current_user).passed.joins(:hack) user_codes = HackUserLastestCode.joins(:hack).mine(current_user).passed
@simple_count = user_codes.where(hacks: {difficult: 1}).count @simple_count = user_codes.where(hacks: {difficult: 1}).count
@medium_count = user_codes.where(hacks: {difficult: 2}).count @medium_count = user_codes.where(hacks: {difficult: 2}).count
@diff_count = user_codes.where(hacks: {difficult: 3}).count @diff_count = user_codes.where(hacks: {difficult: 3}).count

Loading…
Cancel
Save