Since created_atthey updated_atare of type DateTime, this should work.
created = article.created_at
updated = article.updated_at
minutes = ((updated - created) * 24 * 60).to_i
Explanation:
DateTimes . e-d (28807336643183/28800000000000). , 24*60 ( 24 , - 60 )
():
d = DateTime.now
=> Tue, 13 Jun 2017 10:21:59 +0530
2.3.3 :003 > e = DateTime.now + 1.day
=> Wed, 14 Jun 2017 10:22:21 +0530
g = ((e-d) * 24 * 60).to_i
=> 1440