eargollo / soccer

0 stars 0 forks source link

Update timestamps at Simulation model #6

Open eargollo opened 10 months ago

eargollo commented 10 months ago
          In general, when a model's attribute is a timestamp, Rails convention is to use an `_at` prefix, so that it's clear that the column is a timestamp, both in the database schema and in the rails code.

When I read sim.finish, for example, I would assume it's a boolean (in which case, it would actually be conventional to be named semantically as finished, because then AR will implement finished? implicitly.

    sim.finished_at = Time.zone.now

_Originally posted by @csalvato in https://github.com/eargollo/soccer/pull/4#discussion_r1375332751_