Method: SmsNotification#deliver_message!
- Defined in:
- lib/app/models/sms_notification.rb
#deliver_message! ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/app/models/sms_notification.rb', line 31 def return unless SystemConfiguration.twilio_configured? config = SystemConfiguration.configuration account_sid = config.twilio_account_id auth_token = config.twilio_auth_token client = Twilio::REST::Client.new account_sid, auth_token = client.account..create( body: , to: to, from: config.twilio_phone_number ) # We are saved in the calling class, no reason to save again set sid: .sid end |