<commit_before>class Broker::SeekersController < InheritedResources::Base

  before_filter :authenticate_broker!
  before_filter :optional_password, only: [:update]

  load_and_authorize_resource :seeker, through: :current_region, except: :new

  def show
    redirect_to broker_dashboard_url
  end

  def create
    @seeker = Seeker.new(permitted_params[:seeker])
    @seeker.terms = '1'

    create!
  end

  protected

  def current_user
    current_broker
  end

  def optional_password
    if params[:seeker][:password].blank?
      params[:seeker].delete(:password)
      params[:seeker].delete(:password_confirmation)
    end
  end

  def permitted_params
    params.permit(seeker: [:id, :password, :password_confirmation, :firstname, :lastname, :street, :place_id, :sex, :email, :phone, :mobile, :date_of_birth, :contact_preference, :contact_availability, :active, :confirmed, :terms, :status, work_category_ids: []])
  end

end
<commit_msg>Modified seeker form<commit_after>class Broker::SeekersController < InheritedResources::Base

  before_filter :authenticate_broker!
  before_filter :optional_password, only: [:update]

  load_and_authorize_resource :seeker, through: :current_region, except: :new

  def index
    redirect_to broker_dashboard_url
  end

  def show
    redirect_to broker_dashboard_url
  end

  def create
    @seeker = Seeker.new(permitted_params[:seeker])
    @seeker.login = @seeker.mobile

    create!
  end

  protected

  def current_user
    current_broker
  end

  def optional_password
    if params[:seeker][:password].blank?
      params[:seeker].delete(:password)
      params[:seeker].delete(:password_confirmation)
    end
  end

  def permitted_params
    params.permit(seeker: [:id, :password, :password_<PASSWORD>, :firstname, :lastname, :street, :place_id, :sex, :email, :phone, :mobile, :date_of_birth, :contact_preference, :contact_availability, :active, :confirmed, :terms, :status, work_category_ids: []])
  end

end

{'fraction_non_alphanumeric': 0.1065989847715736, 'fraction_numerical': 0.0005076142131979696, 'mean_word_length': 4.936746987951807, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '123370', 'n_tokens_mistral': 666, 'n_tokens_neox': 634, 'n_words': 137}