app/helpers/application_helper.rb
# If the string is longer than 17 characters, returns a string with a max-width attribute assigned 
# to be 0.6 times (in em) the length of the string.
If the string is longer than 17 characters, returns a string with a max-width attribute assigned
to be 0.6 times (in em) the length of the string.
If the string is longer than 17 characters returns a string with a max - width attribute assigned to be 0 . 6 times ( in em ) the length of the string .
def max_width_by_string(string)
    if string.length > 17
      return "width:#{string.length * 0.6}em;"
    end
    return ""
  end
def max_width_by_string ( string ) if string . length > 17 return "width:#{string.length * 0.6}em;" end return "" end
If the string is longer than 17 characters, returns a string with a max-width attribute assigned
to be 0.6 times (in em) the length of the string.
If the string is longer than 17 characters returns a string with a max - width attribute assigned to be 0 . 6 times ( in em ) the length of the string .
string