Revision 6c77d09b
Added by Ewoud Kohl van Wijngaarden 2 months ago
- added
- modified
- copied
- renamed
- deleted
- .rubocop.yml (diff)
- app
- controllers
- api
- base_controller.rb (diff)
- v2
- auth_sources_controller.rb (diff)
- common_parameters_controller.rb (diff)
- config_reports_controller.rb (diff)
- filters_controller.rb (diff)
- host_statuses_controller.rb (diff)
- instance_hosts_controller.rb (diff)
- personal_access_tokens_controller.rb (diff)
- settings_controller.rb (diff)
- smart_proxy_hosts_controller.rb (diff)
- concerns
- api
- controllers
- test
Fixes #37273 - Use delegation syntax for resource_scope
In Ruby 3 you need to explicitly delegate keyword arguments, or if you
don't care about Ruby 2.6 or prior then you can use the new delegation
syntax1.
It deals with the difference in calling where. When calling `.where([])`
it returns an array while `.where(*[])` returns an instance of
`WhereChain` which consumers of the method can't deal with. Because of
that it calls `.all`.
[1]: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/