I'm trying to left justify a string in a rails view with a pad character.
The following doesn't work:
<%= menu_items.description.ljust(5,".")%>
Neither does this:
<%= menu_items.description.to_s.ljust(5,".")%>
Just to mess around and try to get something I found the following works.
<%= menu_items.description.length.to_s.ljust(5,".")%>
It prints out the length converted to a string and appends the pad characters. What gives? How do I make the first snippet work?