title: Subtracting two dates in ruby on rails
body: <p>I'm subtracting two dates in my model in this way:-</p>
  
  <pre><code>  def total_days
        self.to_date - self.from_date
    end
  </code></pre>
  
  <p>My date is in <code>Mysql  Date</code> (YYYY-MM-DD)format.</p>
  
  <p>When displaying my date in view it is giving me <code>5/1</code> days. Even though 5 is correct it is appending <code>'/1'</code> to the days. How can i remove this. Is there any better way of doing it?</p>