I am trying to add some fields to the user after the user has registered and I am using devise.
This is the code which I am trying to put in RegistrationsController
if resource.save
address_1 = resource.address.split(',')
resource.city = address[0]
resource.state = address[1]
However after the user registers these fields (city and state appear to be nil).
Can some tell how to properly override the registration controller so that once the user registers I can perform certain action before saving the user in the db?
It seems I was not giving the controller properly by giving the overridden controller name in the route file everything is working as expected.