title: Sort alphabetically in Rails
body: <p>How do I sort an array in Rails (alphabetical order). I have tried:</p>
  
  <pre><code>sort_by(&amp;:field_name) 
  </code></pre>
  
  <p>which that gives me an array with capital letter order and then lower case order. I have tried:</p>
  
  <pre><code>array.sort! { |x,y| x.field_name.downcase &lt;=&gt; y.field_name.downcase }
  </code></pre>
  
  <p>Is there any way to solve this?</p>