I want to pass multiple parameter but don't know the numbers.
Like model names.
how to pass those parameters into rake task and how to access those parameters inside rake task.
Like, rake test_rake_task[par1,par2,par3]
I want to pass multiple parameter but don't know the numbers.
Like model names.
how to pass those parameters into rake task and how to access those parameters inside rake task.
Like, rake test_rake_task[par1,par2,par3]
You may try something like that:
rake test_rake_task SOME_PARAM=value1,value2,value3
And in rake task:
values = ENV['SOME_PARAM'].split(',')