Fixing method for Rails string