you are viewing a single comment's thread
view the rest of the comments
[–] 2 points 1 year ago* (1 child)

days is a method on the Numeric class in Rails, and it creates an instance of ActiveSupport::Duration with self passed to the constructor (this is a bit of a simplification, because it actually calls the class method days on Duration which converts the number of days into seconds before creating the Duration instance).

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    Oh god good ol ActiveSupport. I'm having flashbacks of so many ruby projects trying not to bring it in and basically reinventing it but poorly documented.

    I still would say it was the language I've most enjoyed (professionally used most all higher level languages over 20+ years) but it might be nostalgia for a time early 2010s when rails was just freaking magic compared to the ways we used to build web apps.

  • source
  • parent