Devise: Error: protected method `render' called for DeviseInvitable::RegistrationsController

Created on 3 Dec 2015  路  5Comments  路  Source: heartcombo/devise

Hello,
I'm using devise 3.5.2 with Rails 4.2.4 (generated with RailsApps template) and have a problem with the #update action on the RegistrationsController if the update is not successful (e.g. because the current password does not match). Successful updates are no problem. The error raised says:

protected method `render' called for DeviseInvitable::RegistrationsController

From the stack trace I found the call to responds_with to be the reason.
This goes into responders and there finally ends up calling render as a delegate

The problem seems to be that the responder does not belong to ActionController although it is defined in that module. But it would be allowed to call protected methods, if everything was wired together properly I think.
Any ideas how I can fix this?

Most helpful comment

Damn, how stupid (me of course)! I found the cause of the problem and I could have found it immediately if I just literally followed the exception ...
In my application I have overridden the render method in the ApplicationController to assign some template variables that should be shown always and I made that method protected ... just for the case that someone is as clever me.

All 5 comments

But the error is coming from the DeviseInvitable package. Could you please report it there?

I looked into DeviseInvitable and found, that it just extends the RegistrationsController of Devise and the code in which the error occurs belongs to Devise which is why I wrote here.
But thanks for that hint, it made me think of trying to load my app with DeviseInviteable unplugged to test whether it messes up the class with this.
I'll test that tomorrow and report in DeviseInviteable if it turns out to be the cause.

If I remove devise_inviteable from my Gemfile then I still get the same error, now for Devise::RegistrationsController

Can you please provide a sample application that reproduces the error?

Damn, how stupid (me of course)! I found the cause of the problem and I could have found it immediately if I just literally followed the exception ...
In my application I have overridden the render method in the ApplicationController to assign some template variables that should be shown always and I made that method protected ... just for the case that someone is as clever me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

emn178 picture emn178  路  4Comments

edipox picture edipox  路  4Comments

ragesoss picture ragesoss  路  3Comments

mikeki picture mikeki  路  4Comments

BimaPanduW picture BimaPanduW  路  3Comments