You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Rails 6.0.2.2, devise 4.7.1 and devise_token_auth 1.1.3.
On a new app when I run the generator $ rails g devise_token_auth:install User auth
I get File unchanged! The supplied flag value not found! app/models/user.rb
It looks as if the generator is hard coded to only look for class User < ApplicationRecord if you are using Rails 5.
from lib/generators/devise_token_auth/install_generator.rb line 29 you have: active_record_needle = (Rails::VERSION::MAJOR == 5) ? 'ApplicationRecord' : 'ActiveRecord::Base'
I'm guessing something like: active_record_needle = ([5,6].include?(Rails::VERSION::MAJOR)) ? 'ApplicationRecord' : 'ActiveRecord::Base'
would fix it. Should I create a pull request or is there more to this?
The text was updated successfully, but these errors were encountered:
Using Rails 6.0.2.2, devise 4.7.1 and devise_token_auth 1.1.3.
On a new app when I run the generator
$ rails g devise_token_auth:install User auth
I get
File unchanged! The supplied flag value not found! app/models/user.rb
It looks as if the generator is hard coded to only look for
class User < ApplicationRecord
if you are using Rails 5.from lib/generators/devise_token_auth/install_generator.rb line 29 you have:
active_record_needle = (Rails::VERSION::MAJOR == 5) ? 'ApplicationRecord' : 'ActiveRecord::Base'
I'm guessing something like:
active_record_needle = ([5,6].include?(Rails::VERSION::MAJOR)) ? 'ApplicationRecord' : 'ActiveRecord::Base'
would fix it. Should I create a pull request or is there more to this?
The text was updated successfully, but these errors were encountered: