Codeminer42/cm42-central

View on GitHub
app/controllers/users_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage

Complex method UsersController#create (25.8)
Open

  def create
    build_user
    if @user.save
      @user.teams << current_team unless @user.teams.include?(current_team)
      flash[:notice] = I18n.t('was added to the team', scope: 'users', email: @user.email)
Severity: Minor
Found in app/controllers/users_controller.rb by flog

Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

You can read more about ABC metrics or the flog tool

Complex method UsersController#destroy (22.9)
Open

  def destroy
    @user = policy_scope(User).find(params[:id])
    authorize @user
    @current_team_users = current_team_users

Severity: Minor
Found in app/controllers/users_controller.rb by flog

Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.

You can read more about ABC metrics or the flog tool

There are no issues that match your filters.

Category
Status