Closed sirwolfgang closed 2 years ago
Hey @sirwolfgang, overridding Lockbox methods isn't supported, but you can try something like this if you need it: https://github.com/ankane/lockbox/issues/117#issuecomment-832406639
~I got it working the classic alias chaining.~ Edit: Needed to prepend to deal with AR loading columns from database
I think due to the way this hooks with
define_method
, it can cause issues withsuper
overriding it instead of extending it.I haven't dug deep into what all is going on, but you might be able to generate the methods inside of a module then
Prepend
that module into the model so thatsuper
be used as the method's inheritance stack is intact. Short of that, I would make sure to call this out in the documentation.