app/controllers/users_controller.rb
Complex method UsersController#create (25.8) Open
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)
- Read upRead up
- Exclude checks
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
Open
def destroy
@user = policy_scope(User).find(params[:id])
authorize @user
@current_team_users = current_team_users
- Read upRead up
- Exclude checks
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