Skip to content

Instantly share code, notes, and snippets.

@dsasse07
Created January 10, 2021 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsasse07/83181fedb2d21ba5a2d17acd085d4403 to your computer and use it in GitHub Desktop.
Save dsasse07/83181fedb2d21ba5a2d17acd085d4403 to your computer and use it in GitHub Desktop.
Share password using inherited send_sms module
class Password
belongs_to :group_service
include TwilioControls
def share_password(user, to_phone_number)
body = "#{user.display_full_name} has shared a password!\n
Service Name: #{self.group_service.service.name}
Username: #{self.group_service.service_username}
Password: #{self.password}"
send_sms(to_phone_number, body)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment