working on twilio integration

This commit is contained in:
Jared Cosulich 2017-03-10 16:08:41 -05:00
parent 8b19e1fac2
commit 730d6cbbde
2 changed files with 2 additions and 6 deletions

View file

@ -3,7 +3,7 @@ class AttemptsController < ApplicationController
protect_from_forgery :except => [:twilio]
def twilio
attempt = Attempt.where(twilio_sid: params['MessageSid']).first
attempt = Attempt.where(twilio_sid: params['From']).first
attempt.update_attributes(
answer_index: params[:Body].to_i,
twilio_details: params.to_h.to_yaml