-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Generator doesn't work correctly with mongoid and/or rails-api #14
Comments
Thanks @smarquez1 - I don't have much experience with mongoid, but I'll take a look and see what it takes to add support. Please continue to post issues as you find them. |
I'm also using Rails::API, but not Mongoid. I didn't realize the SetUserByToken concern was supposed to be added to ApplicationController automatically. That would have been helpful, as it wasn't obvious to me that that concern needed to be there at all, and I only discovered the need to add it after a lot of digging. Might it make sense to create a separate issue for including the SetUserByToken concern in a Rails::API ApplicationController, since that doesn't seem to have anything to do with Mongoid? I'd be willing to take a crack at the actual implementation. |
@jasonswett + @smarquez1: thankyouthankyouthankyou! ApplicationController << |
+1 ApplicationController << include DeviseTokenAuth::Concerns::SetUserByToken for rails-api |
accepting PRs for this if anyone would like to implement this feature |
The rails-api issue (the concern not getting inserted into the application controller) has been fixed on #350. |
Hi, I'm using your gem for a rails-api / mongoid project and I had a couple of issues using the generator:
Mongoid: it doesn't add the concern to the model, also it creates a migration (not necessary since it doesn't use activerecord)
Rails-api: it doesn't add the concern to ApplicationController, rails-api uses controllers based on ActionController::API so maybe that's where the issue is
Thanks!
The text was updated successfully, but these errors were encountered: