One Task Per File, Namespaces Match Directories
Learn about directories matching with the namespaces.
We'll cover the following...
Organizing Rake task
To invoke a Rake task, we type bin/rails «task_name»
. Developers often either need to figure out the task name in order to invoke, or they may see an invocation configured and need to find the source code. These are both unnecessarily difficult if we don’t keep the tasks organized.
For example, if we see that we have a task that runs periodically named db:updates:prod:countries
, we can’t just grep for that task name. We have to find :countries
or countries:
in a file, and then see if the namespace containing it is ...