3 ms·
This comment describes well. https://github.com/rails/rails/pull/45553#issuecomment-1179568855 https://github.com/rails/rails/pull/45553#issuecomment-11795...
by ohbarye 4y ago
This comment describes well.
https://github.com/rails/rails/pull/45553#issuecomment-1179568855 https://github.com/rails/rails/pull/45553#issuecomment-11795...
- orf 4y agoI read that comment, but unless you know Ruby most of the specifics are meaningless
- riffraff 4y agothink of pattern matching being implemented via methods on an object which return a hash/array (deconstruct and deconstruct_keys). ActiveRecord objects wrap an hash of attributes, but are also normal objects which have instance variables and methods plus some hooks and specific API that can be expected to be overriden. So it's unclear how the method should behave: just read from the hash? Invoke some specific method? Invoke any method? The answer may be non obvious.
- canadianfella 4y ago