diff --git a/app/controllers/user_classification_count_controller.rb b/app/controllers/user_classification_count_controller.rb index f272920..c3c170a 100644 --- a/app/controllers/user_classification_count_controller.rb +++ b/app/controllers/user_classification_count_controller.rb @@ -38,8 +38,7 @@ def serializer_opts_from_params { period: params[:period], time_spent: params[:time_spent], project_contributions: params[:project_contributions], - order_project_contributions_by: params[:order_project_contributions_by] - } + order_project_contributions_by: params[:order_project_contributions_by] } end def user_classification_count_params diff --git a/spec/serializers/user_classification_counts_serializer_spec.rb b/spec/serializers/user_classification_counts_serializer_spec.rb index ac24d30..b31a866 100644 --- a/spec/serializers/user_classification_counts_serializer_spec.rb +++ b/spec/serializers/user_classification_counts_serializer_spec.rb @@ -80,7 +80,7 @@ it 'shows project_contributions ordered by recents when order_proj_contribution_by is recents' do classification_count_diff_project_created_yesterday = build(:user_diff_proj_classification_count, period: Date.today - 1) - serializer = described_class.new([classification_count_diff_project_created_yesterday,user_classification_count]) + serializer = described_class.new([classification_count_diff_project_created_yesterday, user_classification_count]) serialized = serializer.as_json(serializer_options: { project_contributions: true, order_project_contributions_by: 'recents' }) expect(serialized[:project_contributions].length).to eq(2) expect(serialized[:project_contributions][0][:project_id]).to eq(user_classification_count.project_id)