When do you need the splat operator ("*") in Ruby on Rails?
railsforfounders.substack.com
1. To Split an Array into Separate Arguments When calling a method, if you have an array and you want to pass its elements as separate arguments to a method, you use the splat operator before the array variable. OAuth::Token.authenticate( request, *Doorkeeper.config.access_token_methods, )
When do you need the splat operator ("*") in Ruby on Rails?
When do you need the splat operator ("*") in…
When do you need the splat operator ("*") in Ruby on Rails?
1. To Split an Array into Separate Arguments When calling a method, if you have an array and you want to pass its elements as separate arguments to a method, you use the splat operator before the array variable. OAuth::Token.authenticate( request, *Doorkeeper.config.access_token_methods, )