4 ms·
Once you learn rails well enough it all becomes explicit because you can simply read the source code.
by rorykoehler 6y ago
Once you learn rails well enough it all becomes explicit because you can simply read the source code.
- berkes 6y agoExplicit, for me, means that I determine in the model the `published_at` is a DateTime. Not merely in the DB, and never magically derived from the name (_at=datetime, _on=date). But explicitely defined. E.g. `attribute(:published_at, DateTime, default: ->{DateTime.now})` Rails does not do this entirely "magic", though: it derives it from the database. And true: you can follow the logic along: the magic can be researched easily. But still: I really prefer a system in which I write all that boilerplace (my IDE/vim can do this for me really well) instead of relying on convention, heuristics and magic.