jeudi 20 avril 2017

Format Months in Rails views

In the rails console I can put in:

3.months => 3 months
1.months => 1 month

I would like to have this output in my views as well, I tried:

<%= @plan_months.months %>

And It gives this output:

 31104000

plan_months => 12 it's a Fixum

How can I get this output: 12 months

thanks

Aucun commentaire:

Enregistrer un commentaire