Posts
-
2024-09-18[css]Important styles override inline styles
`!important` styles are considered to be from a higher-priority origin than author styles
-
2024-08-24[rails]Creating a Rails Model Scope Based on the Scope in a Related Model
Use `#joins` and `#merge` together to avoid duplicating the logic of the related model's scope.
-
2024-08-22[ruby]Array#join flattens nested arrays
There's no need to explicitly flatten nested arrays before `join`ing.
-
2024-05-14[css]The Body HTML Element and its Margins
The background shows through the margins.
-
2024-05-06[ruby]Inline rescue
For when you don't care about the error type and just want to convert it to some value.
-
2024-05-03[ruby]Predefined global `$!`
It holds the last error raised.
-
2024-05-01[ruby]Structs and OpenStructs
Using Structs and OpenStructs for value-oriented data.
-
2024-04-29[ruby]Strings as IO objects
You can use strings as IO objects.
-
2024-04-26[ruby]String#split behavior
When to expect empty arrays and empty strings in the output.