I'm pretty new to Rails, but followed the excellent suggestion/walkthrough here. I've gotten the creation of my two user types (Clients and Developers) to work successfully with Devise. However, I also want to allow both user types to edit some of their attributes after they are logged in. These attributes are also specific to their user types (client specific fields or developer specific fields).
To do this, I thought that I needed to create a custom update
in user_registrations_controller
which inherits from Devise::RegistrationController
as would make sense. During my customization however, I realize within update
I am unable to call other default methods from Devise::RegistrationController
. As a sanity check, I overrode update
with an exact copy of the update
method as defined in the original Devise::RegistrationController
and still had this issue.
More specifically, the error I receive is: undefined local variable or method 'account_update_params' for #<UserRegistrationsController:0x007fe4f0342d58>
, despite account_update_params
being a method in the inherited controller.
Is there a better way to edit the fields specific to my user types (client/developer) in Devise without having to customize update
? Also, what is going on with this error here, as I believe I am inheriting from Devise::RegistrationController
?
Any thoughts? Help and suggestions much appreciated! =)
Versions: Rails 3.2.12, ruby 1.9.3p249