-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Helper method to create an sms link #36511
Conversation
I think this should be |
Fair point. Changed the method name to |
…/desktop's messaging client with the phone number and optional body value prepopulated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simple doc changes :)
Are there any additional messaging clients that we can test this with? |
🤜🏻🤛🏻 |
unless ios_greater_or_equal?("10", user_agent) || android_greater_or_equal?('6.0.1', user_agent) # problem was fixed in ios 10 and android 6.0.1+
body.gsub!('%', '%25')
end Maybe this is still actual and should be supported. |
# HTML attributes for the link can be passed in +html_options+. | ||
# | ||
# When clicked, an SMS message is prepopulated with the passed phone number | ||
# and optional +body+ value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed by 0e149ab.
Hello, There is a small problem: when I want to open sms app without any number, the ";" just before the "?" => "sms:;?" add in the phone field a blank phone number. If you can remove the ";" when phone is blank then it work correctly. Cordialement, |
When the user clicks the sms link, the user's messaging software is opened with the passed in phone number and optional body value prepopulated.
Test page :
https://sms-to-rails-test.herokuapp.com/
Summary
OSX Chrome/Safari
Android
iOS Safari