rake-tasks

Installation
SKILL.md

Rake Tasks

Apps with rolemodel-rails in the Gemfile write rake tasks with Rolemodel::Utility::TaskTools, not hand-rolled puts, ENV flags, or progress printing.

The gem's README is the API documentation: run bundle info rolemodel-rails --path and read the Rolemodel::Utility::TaskTools section of README.md there. This skill doesn't restate it.

Shape

require 'rolemodel/utility/task_tools'

namespace :articles do
  include Rolemodel::Utility::TaskTools

  desc 'Backfill missing slugs (DRY_RUN=true to preview)'
  task backfill_slugs: :environment do
    scope = Article.where(slug: nil)
    total = scope.count
Installs
3
GitHub Stars
7
First Seen
14 days ago