Open lukefan opened 3 years ago
Hey @lukefan , I see what you are saying!
If you are interested in creating a PR for this I would say a new boolean argument called mongoid
that will determine which DTA generator is executed is the simplest way to go. Otherwise we can take a look as soon as we have some spare time.
Let me know if you want to discuss this further.
There is a simple way, make two install_generator, graphql_devise:install and graphql_devise:install_mongoid, just like devise_token_auth.
That solution is in fact the one we would prefer in the long term, that said it will imply some refactor to make sure code is reused in both generators instead of duplicating it.
What is the problem the enhancement will solve?
When I use mongoid and run rails g graphql_devise:install, I got an error, Uninitialized ActiveRecord.
Describe the solution you have in mind
I changed install_generator.rb, from generate 'devise_token_auth:install', "#{user_class} #{mount_path}" to generate 'devise_token_auth:install_mongoid', "#{user_class} #{mount_path}"
it worked. Please check database first, before run.