def capitalize_field( str )
      str.to_s.split("-").map { |v| v.capitalize }.join("-")
    end
def capitalize_field( str )
      str.to_s.split("-").map { |v| v.capitalize }.join("-")
    end
Capitalizes a string that is joined by hyphens correctly.

 Example:

  string = 'resent-from-field'
  capitalize_field( string ) #=> 'Resent-From-Field'