Since I am waiting for an answer, my research shows that the mapping indicated in the documentation actually refers to the resource to which the application is attached.
The following is speculative on my part, but it seems to work, and it is consistent with my code review. For example, if you have only one resource called User, which you used Devise for authentication, you will need to use only the following settings in your controller settings:
@request.env["devise.mapping"] = Devise.mappings[:user]
However, if you have several models that you authenticate to, say, a user and an administrator, you will need to use the following, respectively.
@request.env["devise.mapping"] = Devise.mappings[:user]
and
@request.env["devise.mapping"] = Devise.mappings[:admin]
Please feel free to update this question / answer if you have a better input.
Matthew brown
source share