Created
July 26, 2016 10:48
-
-
Save leoallen85/addca7e36306d320e4bb3f32532d036b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
# ... | |
def send_sms(message) | |
twilio = Twilio::REST::Client.new(Rails.application.config.twilio_account_id) | |
args = { | |
to: phone_number, | |
body: message | |
} | |
client.messages.create(args) | |
end | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment