<commit_before>class User::AccountController < ApplicationController
  skip_authorization_check
  layout 'internal'

  def edit
    @form = User::Update.new(user: current_user)
  end

  def update
    @form = User::Update.new(params[:user], user: current_user)
    outcome = @form.submit
    errors.add outcome.errors
    if outcome.success?
      redirect_to account_url<commit_msg>enforce user is logged in to edit an account<commit_after>class User::AccountController < ApplicationController
  skip_authorization_check
  layout 'internal'

  before_action :ensure_logged_in

  def edit
    @form = User::Update.new(user: current_user)
  end

  def update
    @form = User::Update.new(params[:user], user: current_user)
    outcome = @form.submit
    errors.add outcome.errors
    if outcome.success?
      redirect_to account_url
{'fraction_non_alphanumeric': 0.08533653846153846, 'fraction_numerical': 0.0, 'mean_word_length': 4.20625, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7379984', 'n_tokens_mistral': 247, 'n_tokens_neox': 243, 'n_words': 61}