Class: Twilio::Rails::SMS::UpdateMessageOperation
- Inherits:
-
ApplicationOperation
- Object
- ActiveOperation::Base
- ApplicationOperation
- Twilio::Rails::SMS::UpdateMessageOperation
- Defined in:
- app/operations/twilio/rails/sms/update_message_operation.rb
Overview
Called by Twilio::Rails::SMSController with the Twilio params to update an existing SMS message with any status changes or updates that Twilio sends. The save will only happen if there has been a change.
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'app/operations/twilio/rails/sms/update_message_operation.rb', line 11 def execute = ::Twilio::Rails.config..find() if params["MessageStatus"].present? .status = params["MessageStatus"] end if .changed? .save! end end |