paulelliott / fabrication

This project has moved to GitLab! Please check there for the latest updates.
https://gitlab.com/fabrication-gem/fabrication
MIT License
998 stars 97 forks source link

Allow overrides to be `nil` #318

Closed benedikt closed 4 years ago

benedikt commented 4 years ago

This fixes a problem where attribute methods would be treated as missing when their override value was set to nil.

Instead of relying on the value of the attribute, this commit changes the behavior to use fetch on the attributes hash. Only a truly missing attribute will now trigger the super call in method_missing.

paulelliott commented 4 years ago

Looks great! Thank you!

paulelliott commented 4 years ago

Just released 2.21.1 with this change. Thanks again!

benedikt commented 4 years ago

Thanks for the fast turnaround! Much appreciated 👍