app/controllers/notifications_controller.rb
#command for sending just a message to the team
command for sending just a message to the team
command for sending just a message to the team
def send_whole_team(message)
    @client = Twilio::REST::Client.new ENV['TWILIO_ACCOUNT_SID'], ENV['TWILIO_AUTH_TOKEN']
        from = ENV['TWILIO_PHONE']
        User.all.each do |friend|
        @client.account.messages.create(
                    :from => from,
                    :to => friend.phone,
                    :body => "From Shufflebot: \n#{message}"
                    )
        end
  end
def send_whole_team ( message ) @client = Twilio :: REST :: Client . new ENV [ 'TWILIO_ACCOUNT_SID' ] , ENV [ 'TWILIO_AUTH_TOKEN' ] from = ENV [ 'TWILIO_PHONE' ] User . all . each do | friend | @client . account . messages . create ( :from => from , :to => friend . phone , :body => "From Shufflebot: \n#{message}" ) end end
command for sending just a message to the team
command for sending just a message to the team
message