ece517-p3/expertiza

View on GitHub
app/controllers/answer_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for index is too high. [15.43/15]
Open

  def index
    if params.key?(:response_id)
      join_query = sanitize_sql_array(["LEFT JOIN answers ON answers.question_id = questions.id AND answers.response_id = '?'", params[:response_id]])
    end
    where_query = sanitize_sql_array(["questions.questionnaire_id = '?'", params[:questionnaire_id]]) if params.key?(:questionnaire_id)

This cop checks that the ABC size of methods is not higher than the configured maximum. The ABC size is based on assignments, branches (method calls), and conditions. See http://c2.com/cgi/wiki?AbcMetric

There are no issues that match your filters.

Category
Status