app/controllers/api/v1/voters_controller.rb
# Only allow a trusted parameter "white list" through.
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .
def voter_params
    params.require(:data)
          .require(:attributes)
          .permit(:user_id, :electoral_id_number, :expiration_date, :emission_year, :first_name,
                  :first_last_name, :second_last_name, :gender, :date_of_birth, :electoral_code,
                  :curp, :state, :municipality, :locality, :section, :suburb, :street, :outside_number,
                  :inside_number, :postal_code, :state_code, :municipality_code, :locality_code,
                  :home_phone, :mobile_phone, :email, :alternative_email, :facebook_account,
                  :highest_educational_level, :current_ocupation, :organization, :party_positions_held,
                  :is_part_of_party, :has_been_candidate, :popular_election_position, :election_year,
                  :won_election, :election_route, :notes)
  end
def voter_params params . require ( :data ) . require ( :attributes ) . permit ( :user_id , :electoral_id_number , :expiration_date , :emission_year , :first_name , :first_last_name , :second_last_name , :gender , :date_of_birth , :electoral_code , :curp , :state , :municipality , :locality , :section , :suburb , :street , :outside_number , :inside_number , :postal_code , :state_code , :municipality_code , :locality_code , :home_phone , :mobile_phone , :email , :alternative_email , :facebook_account , :highest_educational_level , :current_ocupation , :organization , :party_positions_held , :is_part_of_party , :has_been_candidate , :popular_election_position , :election_year , :won_election , :election_route , :notes ) end
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .