Use ActiveSupport::HashWithIndifferentAccess
Using `HashWithIndifferentAccess` directly will be deprecated in Rails 5.1.
This commit is contained in:
@@ -12,7 +12,7 @@ class UsersController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def set_activity_counts
|
def set_activity_counts
|
||||||
@activity_counts = HashWithIndifferentAccess.new(
|
@activity_counts = ActiveSupport::HashWithIndifferentAccess.new(
|
||||||
proposals: Proposal.where(author_id: @user.id).count,
|
proposals: Proposal.where(author_id: @user.id).count,
|
||||||
debates: (Setting["process.debates"] ? Debate.where(author_id: @user.id).count : 0),
|
debates: (Setting["process.debates"] ? Debate.where(author_id: @user.id).count : 0),
|
||||||
budget_investments: (Setting["process.budgets"] ? Budget::Investment.where(author_id: @user.id).count : 0),
|
budget_investments: (Setting["process.budgets"] ? Budget::Investment.where(author_id: @user.id).count : 0),
|
||||||
|
|||||||
Reference in New Issue
Block a user