Title Case for Ruby Strings

How to convert a string to Title Case Break into words Capitalise each word Join back together split(/(\W)/).map(&:capitalize).join or example “hello world”.split(/(\W)/).map(&:capitalize).join “Hello World” or s = “hello world”Title Case for Ruby Strings s.split(/(\W)/).map(&:capitalize).join Or from a associated table For a given entity p (call it a product) Collect all of the sizes assigned to […]