0

Windows 8.1 Ruby 2.0 Rails 4.1 Devise

I am using Devise for users management. I finish the registration process OK, and then I receive an email asking me to confirm. Everything is working like it's supposed to.

The link in the email is the following:

http://localhost:3000/confirmation?confirmation_token=2RSshr4nKyL3FUqsvxc1 

When I click on it, I get the following error:

undefined local variable or method `resource_class' for #<ConfirmationsController:0x00000006f7ba88>

and it points to line 14 of the conformations controller, which is the following line:

def show
  self.resource = resource_class.confirm_by_token(params[:confirmation_token])

Any ideas?

EastsideDev
  • 6,257
  • 9
  • 59
  • 116
  • do you have field name `resource_class` in your `confirmations` table? post the confirmations table – Wally Ali Jul 02 '14 at 05:35
  • There is no confirmations table. This is Devise and the User table – EastsideDev Jul 02 '14 at 06:11
  • ok. where is `resource_class` defined? the error message means the `ConfirmationsController` doesn't have a `resource_class` attribute – Wally Ali Jul 02 '14 at 06:28
  • have you inherited the your confirmations controller(say `User::ConfirmationsController`) with `Devise::ConfirmationsController` ? – raviture Jul 02 '14 at 07:24
  • ravi1991: I assumed that the devise installer would have taken care of it, but for some reason, the confirmations controller inherited the application controller. I modified it and it's now working fine. If you change this to an answer I will accept it. – EastsideDev Jul 02 '14 at 07:32

0 Answers0