Hello all,
I can't understand why the following code keeps throwing the wrong
number of arguments error. Even if I leave the function empty it still
throws the error. What am I doing wrong?
class SmsController < ApplicationController
def send
if params[:send] == "true"
account = Twilio::RestAccount.new(TWILIO_CONFIG['ACCOUNT_SID'],
TWILIO_CONFIG['ACCOUNT_TOKEN'])
d = {
'From' => TWILIO_CONFIG['CALLER_ID'],
'To' => '1234567,
'Body' => 'Testing'
}
@resp = account.request("/#{TWILIO_CONFIG['API_VERSION']}/
Accounts/#{TWILIO_CONFIG['ACCOUNT_SID']}/SMS/Messages", 'POST', d)
@resp.error! unless @resp.kind_of? Net::HTTPSuccess
end
end
end