Environment
- Ruby 3.3.3
- Rails 8.1.0.alpha
- Devise 4.9.4
Current behavior
Strangely enough this only is reported in test ?!
√ bellis % rails test test/services/dinero_service_test.rb
DEPRECATION WARNING: resource received a hash argument only. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument path. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument path_names. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument controller. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument only. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument path. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument path_names. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
DEPRECATION WARNING: resource received a hash argument controller. Please use a keyword instead. (called from block in <main> at /Users/walther/Deling/Walther/src/mortimer/redbox/bellis/config/routes.rb:4)
Running 5 tests in a single process (parallelization threshold is 50)
Run options: --seed 28000
The warnings go away if I comment this in config/routes.rb
devise_for :users, controllers: {
invitations: "users/invitations",
registrations: "users/registrations",
sessions: "users/sessions",
confirmations: "users/confirmations",
passwords: "users/passwords",
unlocks: "users/unlocks",
omniauth_callbacks: "users/omniauth_callbacks"
}
Cannot find anything on SO and neither in the Devise repo ?
Not sure what keyword I should use - trying to follow Devise documented config
* controllers: the controller which should be used. All routes by default points to Devise controllers.
However, if you want them to point to custom controller, you should do:
devise_for :users, controllers: { sessions: "users/sessions" }
My wrong doing ?
Expected behavior
I would not expect any deprecation warnings at all (eg. none seen when running dev )
Environment
Current behavior
Strangely enough this only is reported in test ?!
The warnings go away if I comment this in
config/routes.rbCannot find anything on SO and neither in the Devise repo ?
Not sure what keyword I should use - trying to follow Devise documented config
My wrong doing ?
Expected behavior
I would not expect any deprecation warnings at all (eg. none seen when running
dev)