ece517-p3/expertiza

View on GitHub
app/controllers/advertise_for_partner_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Assignment Branch Condition size for update is too high. [32.26/15]
Open

  def update
    begin
      @team = AssignmentTeam.find_by(id: params[:id])
      @team.update_attributes(comments_for_advertisement: params[:comments_for_advertisement])
      participant = AssignmentParticipant.find_by(parent_id: @team.assignment.id, user_id: session[:user].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

Assignment Branch Condition size for remove is too high. [30.28/15]
Open

  def remove
    begin
      team = AssignmentTeam.find_by(id: params[:team_id])
      team.update_attributes(advertise_for_partner: false, comments_for_advertisement: nil)
      participant = AssignmentParticipant.find_by(parent_id: team.assignment.id, user_id: session[:user].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

Assignment Branch Condition size for create is too high. [22.09/15]
Open

  def create
    team = AssignmentTeam.find_by(id: params[:id])
    team.update_attributes(advertise_for_partner: true, comments_for_advertisement: params[:comments_for_advertisement])
    participant = AssignmentParticipant.find_by(parent_id: team.assignment.id, user_id: session[:user].id)
    ExpertizaLogger.info LoggerMessage.new(controller_name, session[:user].name, 'Your advertisement has been successfully created.', request)

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