I want a string such as "This is Bob's sentence" to be modified to be "This is Bob\'s sentence"
My research seems to indicate that the following should work
"This is Bob's sentence".gsub("'", "\\'")
But the result I get is
"this is Bobs messages message"
I'm doing this in a rails app. Perhaps something else in the app is causing the issue? If you could please inform me of a ruby method which you know should work I would greatly appreciate it. Thanks in advance.