Sha256: 0cb08b44378dbaa1ef80c271e0316e0bc0e7bfe72f8363c9f517df0e4aafcb09
Contents?: true
Size: 815 Bytes
Versions: 33
Compression:
Stored size: 815 Bytes
Contents
# frozen_string_literal: true # # Twilio configuration, both fields and methods to determine configuration # module TwilioConfiguration extend ActiveSupport::Concern # # The Twilio Configuration # def self.included(base) base.class_eval do field :twilio_account_id, type: String field :twilio_auth_token, type: String field :twilio_phone_number, type: String end end # # Make sure the password doesn't get blanked out on an update # def secure_fields super + %i[twilio_auth_token] end # # Determine if twilio is configured at a system configuration # # Examples # # twilio_configured?? # # => true || false # def twilio_configured? [twilio_account_id.present?, twilio_auth_token.present?, twilio_phone_number.present?].all? end end
Version data entries
33 entries across 33 versions & 1 rubygems