I used this solution based on devise_parameter_sanitizer
to set some custom attributes to my Devise (User) model and make them available at sign_up and edit forms.
Everything works fine but from time to time (and it happens pretty often) specifically when I sign in, sign out or edit user (so I assume the problem is related to sessions), I get the following error:
Is there any logic that I can add to my code above to present this issue?