tags:

views:

25

answers:

1

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]

A: 

You may try something like that:

rake test_rake_task SOME_PARAM=value1,value2,value3

And in rake task:

values = ENV['SOME_PARAM'].split(',')
lest
@lest can't i pass parameter this way ?? rake test_rake_task[par1,par2,par3] and access it ??
krunal shah
I've described the only way I know to pass parameters to rake task. It seams impossible to execute rake task with something like `rake test_rake_task[par1,par2,par3]`.
lest