Trivial Rails tip: easy html spaces

For when you don't want to type &nbsp; a dozen times, add this to application_helper.rb: def nbsp(n=1)     n.times.map {"&nbsp;"} end In a view: <%= nbsp 5 %> replaces &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Alan 16 July 2010