-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to map to Users::User? #46
Comments
FWIW, hardcoding the instance variable does work. ---
lib/api_guard/resource_mapper.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/api_guard/resource_mapper.rb b/lib/api_guard/resource_mapper.rb
index ad4ed04..b320b45 100644
--- a/lib/api_guard/resource_mapper.rb
+++ b/lib/api_guard/resource_mapper.rb
@@ -7,7 +7,7 @@ class ResourceMapper
def initialize(routes_for, class_name)
@resource_name = routes_for.singularize
@resource_class = class_name.constantize
- @resource_instance_name = "@api_guard_#{routes_for}"
+ @resource_instance_name = "@api_guard_user"
end
end jeanpaulsio@358a34f#diff-d35c3a8e79baffe631963359f9cca892b4ed3dc713a84f7e13c019b7ee1291f6R10 |
@joemasilotti Thanks for reporting. We need an option to specify the class name in the route configuration as available in |
Amazing, thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Our app scopes our user model to
Users::User
. How can we configure API Guard's routes to work with this? (We are also using Devise.)This seems to be the only combination of
for:
,as:
, andpath:
options that doesn't raise an error when starting the server. But when POSTing to/api/users/sign_in
I get the following error.I'm assuming (hoping!) this can be fixed in the route configuration. Any help would be greatly appreciated!
The text was updated successfully, but these errors were encountered: