<commit_before>class Users::NotificationsController < ApplicationController
  respond_to :html, :json

  before_action :authenticate_user!

  def edit
    if params[:auth_token] and params[:preference]
      current_user.update_attributes(mail_preference: params[:preference])
      redirect_to settings_notifications_path
    end
  end

  def update
    current_user.update_attributes(notifications_params)

    respond_with current_user, location: settings_notifications_path
  end

  # private

  def notifications_params
    params.require(:user).permit(:mail_preference)
  end
end<commit_msg>fix updating email setting from email footer<commit_after>class Users::NotificationsController < ApplicationController
  respond_to :html, :json

  before_action :authenticate_user!

  def edit
    if params[:preference]
      current_user.update_attributes(mail_preference: params[:preference])
    end
    redirect_to settings_path
  end

  def update
    current_user.update_attributes(notifications_params)

    respond_with current_user, location: settings_notifications_path
  end

  # private

  def notifications_params
    params.require(:user).permit(:mail_preference)
  end
end
{'fraction_non_alphanumeric': 0.06160337552742616, 'fraction_numerical': 0.0, 'mean_word_length': 5.1450777202072535, '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': '2883945', 'n_tokens_mistral': 342, 'n_tokens_neox': 324, 'n_words': 71}