mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Adds an example of how to access the arguments passed to a custom rake task [ci skip]
This commit is contained in:
parent
a5a4b56029
commit
0b2f8b1cb9
1 changed files with 2 additions and 2 deletions
|
@ -526,8 +526,8 @@ end
|
|||
To pass arguments to your custom rake task:
|
||||
|
||||
```ruby
|
||||
task :task_name, [:arg_1] => [:pre_1, :pre_2] do |t, args|
|
||||
# You can use args from here
|
||||
task :task_name, [:arg_1] => [:prerequisite_1, :prerequisite_2] do |task, args|
|
||||
argument_1 = args.arg_1
|
||||
end
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in a new issue