Tag: Ruby
A controlled migration for Rails applications
When it comes to migrating a Rails application, it’s important to understand the necessary steps to guarantee a clear process. If we don’t dedicate some time to this analysis, it’s likely that at some point we’ll have the feeling of stepping on unsafe ground. When dealing with tectonic movements like servers and databases, these insecurities can result directly in a blockage: what’s at stake is not one more or less bug, but the loss of our users’ information.
Objects That Don't Deserve an ID: Using Rails composed_of
In the real world (and in code), there are entities that sit somewhere between a plain scalar and a full-fledged object. What do things like 80 kilograms, 25 kilometers per hour, or 25×25×50 cm really mean? They’re clearly not scalars in the strict sense—they can’t be reduced to a single value like 25 or “Buenos Aires”. But they also share a key trait with scalars: they don’t exist on their own in reality. 80 kilograms describes the weight of something, just as 25 km/h represents the speed of something. Dimensions describe a box, a piece of furniture, or a piano—but mean little on their own.