I\'ve been struggling for a while with this one. I have a Rails4/Devise 3.1 app with two users in the system:
and o
In case of respond_with, for an html response - if the request method is get, an exception is raised but for other requests such as post the response depends on whether the resource has any validation errors (i.e. assuming that an attempt has been made to save the resource, e.g. by a create action) -
If there are no errors, i.e. the resource was saved successfully, the response redirect's to the resource i.e. its show action.
If there are validation errors, the response renders a default action, which is :new for a post request or :edit for patch or put.
source: http://apidock.com/rails/v4.1.8/ActionController/MimeResponds/respond_with
For your case, something like render 'view_path'
in place of respond_with
block should work.