You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can group tasks by placing them in namespaces:
510
504
511
505
```ruby
512
-
namespace :do
506
+
namespace :db
513
507
desc "This task does nothing"
514
508
task :nothing do
515
509
# Seriously, nothing
516
510
end
517
511
end
518
512
```
519
513
520
-
You can see your tasks to be listed by `rake -T` command. And, according to the examples above, you can invoke them as follows:
514
+
Invocation of the tasks will look like:
521
515
522
516
```bash
523
517
rake task_name
524
518
rake "task_name[value 1]"# entire argument string should be quoted
525
-
rake do:nothing
519
+
rake db:nothing
526
520
```
527
521
528
522
NOTE: If your need to interact with your application models, perform database queries and so on, your task should depend on the `environment` task, which will load your application code.
0 commit comments