I have a string in my ruby code which ends with a backslash:
acc.secret_key = "ASJSJJDSJFJJFFJJFJF\"
acc.save
Above is the code snippet, when I try to save it using Active record I get an error, I tried adding another slash that is
acc.secret_key = "ASJSJJDSJFJJFFJJFJF\\"
acc.save
But now I have two slashes in the DB. What am I missing? THanks a lot.
Are you seeing this in the console? If thats the case you're just seeing the escaping not two actual backslashes.
If you look up a record with an escaped backslash in your db console you should see one backslash.
this will push the string with the backshash into the database