trying to get twilio working

This commit is contained in:
Jared Cosulich 2017-03-10 14:40:37 -05:00
parent c8946a02f4
commit a1246c0ef1
2 changed files with 4 additions and 2 deletions

View file

@ -19,8 +19,10 @@ class Attempt < ApplicationRecord
puts message.inspect
puts message.try(:path)
puts message.try(:sid)
# message.path.split('/').last
update_attributes(sent_at: Time.new, twilio_sid: message.path.split('/').last)
update_attributes(sent_at: Time.new, twilio_sid: message.sid)
end
end

View file

@ -119,7 +119,7 @@ class FakeSMS
def create(from:, to:, body:)
self.class.messages << Message.new(from, to, body)
return Struct.new(:path).new('/path')
return Struct.new(:sid).new('sid')
end
end