Hi guys: I'm trying go through a table, read a field, escape out all the
single quotes in there, and write it back again. For some reason my
gsub, even though by all accounts looks right, doesn't seem to be
working. Here is my code:
...
y.text.gsub("'","\\\\'")
thesql = "text = '"+y.text+"'"
Capture.update_all( thesql, "id = "+y.id.to_s )
...
Constantly breaks on an entry that includes
"It's going up on..."
right at the ' in It's.
Any ideas? I even wrote a loop to recurse through the string and make
sure that I was a really a single quote (39)
Thanks...Chris
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.