Uday kumar das Uday kumar das - 1 year ago 106
Ruby Question

Remove double quotes from a string rails 4

I have a string like:

str= "1,2,3,4"

I want to remove double quotes from this string so that i will get the result like
Please help me out.

Answer Source

If you want to alter the var in place:

str.gsub!('"', '')
puts str
# 1,2,3,4
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download