app/controllers/v1/google_forms_controller.rb
# This provides a generic /v1/google_forms endpoint for processinga and submitting
# google forms data to Google. A form post action requires the following:
#  * google_form_metadata - contains form_id and field_mappings
#      * field_mappings - a hash of {form_field_name: 'google.entry.id'}
#      * field_id       - a string of the google form's id
#  * google_form_submission_data - hash of human readable data that will be stored.
#    Google's servers infer type.
#    example: {javascript_skill_level: 'advanced', legislator_nominatoin: 'Jack Russel'}
This provides a generic /v1/google_forms endpoint for processinga and submitting
google forms data to Google. A form post action requires the following:
google_form_metadata - contains form_id and field_mappings
field_mappings - a hash of {form_field_name: 'google.entry.id'}
field_id       - a string of the google form's id
google_form_submission_data - hash of human readable data that will be stored.
Google's servers infer type.
This provides a generic / v1 / google_forms endpoint for processinga and submitting google forms data to Google . A form post action requires the following : google_form_metadata - contains form_id and field_mappings field_mappings - a hash of { form_field_name : ' google . entry . id ' } field_id - a string of the google form ' s id google_form_submission_data - hash of human readable data that will be stored . Google ' s servers infer type .
def create
    person = PersonConstructor.build(person_params).tap(&:save) 
    if google_form_data_params.values.any?(&:present?) || (person && person.valid?)
      GoogleFormsSubmitJob.perform_later(google_form_metadata_params[:form_id], google_form_mapped_data)
      submitted = true
    else
      submitted = false
    end
    render json: { submitted: submitted }
  end
def create person = PersonConstructor . build ( person_params ) . tap ( & :save ) if google_form_data_params . values . any? ( & :present? ) || ( person && person . valid? ) GoogleFormsSubmitJob . perform_later ( google_form_metadata_params [ :form_id ] , google_form_mapped_data ) submitted = true else submitted = false end render json : { submitted : submitted } end
This provides a generic /v1/google_forms endpoint for processinga and submitting
google forms data to Google.
This provides a generic / v1 / google_forms endpoint for processinga and submitting google forms data to Google .
# temporary fix