Alter devise update method and strong params?

369 Views Asked by At

When devise is working with a custom controller (users), how can we alter the update method to happily accept a change in some attributes without requiring password to be submitted as well?

E.g. the form won't let the user update their timezone without also entering their password (twice)

enter image description here

What I know / have tried

I managed to alter the create method, now I wish to alter the update method, and presumably the strong params. I can't locate the strong params and I may not be confident knowing how to alter them if I was successful in finding them

Notes

  • updating the timezone (or any user attributes) results in a PUT to Users::RegistrationsController#update

  • Users::RegistrationsController inherits from Devise::RegistrationsController, but I have no idea where to find Devise::RegistrationsController (I can see it on github but just not in my app)

  • I tried adding this to Users::RegistrationsController but it didn't seem to help

0

There are 0 best solutions below