1

how Remove double quotes from a string ruby on rails ? I have a string like:

"5,5"

conversion logic :

@a = @cart_id.chomp(',')
abort @a.inspect
Ronak Bhatt
  • 113
  • 1
  • 2
  • 14

1 Answers1

4
str = 'hello " 5," world'

str.gsub!('"', '')

puts str #hello  5, world 
Abdullah
  • 2,015
  • 2
  • 20
  • 29