Hi :wave: with reference to an issue (<https://git...
# support
s
Hi πŸ‘‹ with reference to an issue (https://github.com/solidusio/solidus/issues/4645) I would override
solidus_auth_devise/app/models/spree/*user.rb*
I know how to add or update functions (https://guides.solidus.io/developers/customizations/decorators) but how to remove some code like def function or call function ?
n
hey there to remove a function you could define it in your decorator and make it return
nil
(or something else that won't break the code) as for the second part AFAIK you would have to rewrite the whole method without that one or more lines
πŸ‘ 1
w
There’s also
undef
&
remove_method
(they act differently: https://gist.github.com/chrisjpowers/988774), but you probably still need them to be called, so a void definition will probably be the best option.
πŸ‘ 1
πŸ‘† 1
Also, be sure to override in the safest possible way: https://edgeguides.solidus.io/customization/customizing-the-core#using-overrides
πŸ‘ 1
s
Ok thank you for your responses @Naoki Mi @waiting_for_dev πŸ™‚
There is a way for remove a specific callback ? I would remove the callback
after_destroy :scramble_email_and_password
(line 21) in https://github.com/solidusio/solidus_auth_devise/blob/master/app/models/spree/user.rb
w
s
Ok thank you πŸ˜‰