Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Allow overrides to be nil #318

Merged
merged 1 commit into from Apr 2, 2020
Merged

Conversation

benedikt
Copy link
Contributor

@benedikt benedikt commented Apr 2, 2020

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.

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 paulelliott merged commit 586c110 into paulelliott:master Apr 2, 2020
@paulelliott
Copy link
Owner

Looks great! Thank you!

@paulelliott
Copy link
Owner

Just released 2.21.1 with this change. Thanks again!

@benedikt
Copy link
Contributor Author

benedikt commented Apr 6, 2020

Thanks for the fast turnaround! Much appreciated 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants