title: rails sort_by string with empty string latest
body: <pre><code> foot = [{val: "left"}, {val: "right"}, {val: nil}]
   foot.sort_by{ |f| f[:val].to_s } 
   =&gt; [{:val=&gt;nil}, {:val=&gt;"left"},{:val=&gt;"right"}]
  </code></pre>
  
  <p>How do I sort such array descеnded with nil-elements at the end of the list?
  => left, right, nil</p>