Last active
July 26, 2016 10:46
-
-
Save leoallen85/784e46c175a2a0f4d484769afbf82690 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 SMSController < ApplicationController | |
def create | |
user = User.find(params[:id) | |
twilio = Twilio::REST::Client.new(Rails.application.config.twilio_account_id) | |
args = { | |
to: user.phone_number, | |
body: params[: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