<commit_before>class Users::RegistrationsController < Devise::RegistrationsController

  before_filter :configure_permitted_parameters

  protected
  
  def update_resource(resource, params)
    resource.update_without_password(params)
  end  
  
  def after_update_path_for(resource)
    return course_unit_page_path(3,2,1)
  end
  
  def after_sign_up_path_for(resource)
    return courses_url
  end

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) do |u|
      u.permit(:dni, :name, :lastname1, :lastname2, :branch_id, :district, :age, :facebook_username,
      :email, :phone1, :phone2, :password, :password_confirmation)
    end
    devise_parameter_sanitizer.for(:account_update) do |u|
      u.permit(:dni,:code, :name, :lastname1, :lastname2, :branch_id, :district, :age, :facebook_username,
        :email, :phone1, :phone2, :password, :password_confirmation, :current_password)
    end
  end  

end<commit_msg>Agregando code al registro<commit_after>class Users::RegistrationsController < Devise::RegistrationsController

  before_filter :configure_permitted_parameters

  protected
  
  def update_resource(resource, params)
    resource.update_without_password(params)
  end  
  
  def after_update_path_for(resource)
    return course_unit_page_path(3,2,1)
  end
  
  def after_sign_up_path_for(resource)
    return courses_url
  end

  def configure_permitted_parameters
    devise_parameter_sanitizer.for(:sign_up) do |u|
      u.permit(:dni, :code, :name, :lastname1, :lastname2, :branch_id, :district, :age, :facebook_username,
      :email, :phone1, :phone2, :password, :password_confirmation)
    end
    devise_parameter_sanitizer.for(:account_update) do |u|
      u.permit(:dni, :code, :name, :lastname1, :lastname2, :branch_id, :district, :age, :facebook_username,
        :email, :phone1, :phone2, :password, :password_confirmation, :current_password)
    end
  end  

end
{'fraction_non_alphanumeric': 0.09953343701399689, 'fraction_numerical': 0.011404872991187144, 'mean_word_length': 5.069182389937107, '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': '7052474', 'n_tokens_mistral': 664, 'n_tokens_neox': 653, 'n_words': 124}