app/controllers/notifications_controller.rb
def send_user(message, user)
      @client = Twilio::REST::Client.new ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN']

      from = ENV['TWILIO_PHONE']
      @client.account.messages.create(
                  :from => from,
                  :to => user.phone,
                  :body => "For #{user.first_name}: #{message}"
                  )
  end
# command for sending a message to the user. 
command for sending a message to the user.
command for sending a message to the user .
def send_user(message, user)
      @client = Twilio::REST::Client.new ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN']
      from = ENV['TWILIO_PHONE']
      @client.account.messages.create(
                  :from => from,
                  :to => user.phone,
                  :body => "For #{user.first_name}: #{message}"
                  )
  end
def send_user ( message , user ) @client = Twilio :: REST :: Client . new ENV [ 'TWILIO_ACCOUNT_SID' ] , ENV [ 'TWILIO_AUTH_TOKEN' ] from = ENV [ 'TWILIO_PHONE' ] @client . account . messages . create ( :from => from , :to => user . phone , :body => "For #{user.first_name}: #{message}" ) end
command for sending a message to the user.
command for sending a message to the user .
message
user