Posted 3 months ago. Visible to the public.

Run code before or after an existing Rake task

Before

To run additional code before an existing Rake tasks you can add a dependency like this:

Copy
task :before_task do # runs before :existing_task end Rake::Tasks[:existing_task].enhance [:before_task]

The new dependency will be called after all existing dependencies.

After

To run additional code after an existing Rake tasks, pass a block to enhance:

Copy
Rake::Tasks[:existing_task].enhance do # runs after :existing task end

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Avatar
Henning Koch
Last edit:
3 months ago
by Henning Koch
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Henning Koch to makandra dev
This website uses short-lived cookies to improve usability.
Accept or learn more