After a Rails controller action, perform a task.