app/queries/proposal_search_dsl.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Class ProposalSearchDsl has 24 methods (exceeds 20 allowed). Consider refactoring.
Open

class ProposalSearchDsl
  include Elasticsearch::DSL

  attr_reader :params, :current_user, :query_str, :client_data_type

Severity: Minor
Found in app/queries/proposal_search_dsl.rb - About 2 hrs to fix

    Use the return of the conditional for variable assignment and comparison.
    Open

        if relative_to_now
          fielded[:created_at] = "[#{ranges[0].iso8601} TO now]"
        else
          fielded[:created_at] = "[#{ranges[0].iso8601} TO #{ranges[1].utc.iso8601}]"
        end
    Severity: Minor
    Found in app/queries/proposal_search_dsl.rb by rubocop

    Use the return of the conditional for variable assignment and comparison.
    Open

        if @from
          @dsl.from = @from
        elsif params[:from]
          @dsl.from = params[:from].to_i
        else
    Severity: Minor
    Found in app/queries/proposal_search_dsl.rb by rubocop

    Use the return of the conditional for variable assignment and comparison.
    Open

        if params[:size] == :all
          @dsl.size = Proposal::MAX_DOWNLOAD_ROWS
        elsif @size
          @dsl.size = @size
        elsif params[:size]
    Severity: Minor
    Found in app/queries/proposal_search_dsl.rb by rubocop

    There are no issues that match your filters.

    Category
    Status