app/controllers/advertise_for_partner_controller.rb
Assignment Branch Condition size for update is too high. [32.26/15] Open
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)
- Read upRead up
- Exclude checks
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
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)
- Read upRead up
- Exclude checks
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
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)
- Read upRead up
- Exclude checks
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