2

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

Community
  • 1
  • 1
kgong
  • 145
  • 1
  • 7
  • I managed to work around this at the time, to avoid the issue altogether. But here I am again almost two months later, realizing this question still pertains =\. In fact, I had completely forgotten about this question I had posted, and did the exact same steps and, alas, arrived at the exact same problem. Any help is much appreciated =). – kgong Aug 05 '13 at 00:16

1 Answers1

0

After revisiting this, I found this related question. Though this post and top answer is specific to Rails 4, the solution can be found in the Gemfile.

Replace your devise gem include with gem 'devise', :git => 'git://github.com/plataformatec/devise.git'

Simply doing gem 'devise' does not get this updated version, unfortunately. Hope this helps others!

Community
  • 1
  • 1
kgong
  • 145
  • 1
  • 7