07-19-2023, 01:05 AM
I'd like to write a simple function to say in hours:
**How much time has passed since this has been created?**
My attempts:
-time = DateTime.now.hour - (self.created_at.hour)
Does anyone know how to do this in Ruby on Rails?
**How much time has passed since this has been created?**
My attempts:
-time = DateTime.now.hour - (self.created_at.hour)
Does anyone know how to do this in Ruby on Rails?