namespace :slugs do
  desc "Generate slug attribute for objects from classes that use Sluggable concern"
  task generate: :environment do
    %w(Budget Budget::Heading Budget::Group).each do |class_name|
      class_name.constantize.all.each(&:generate_slug)
    end
  end
end

Create rake task to generate slug for objects that use Sluggable concern
Create rake task to generate slug for objects that use Sluggable concern

Why:

* Once slug presence validation and usage is merged on to a code base, existing objects without it will become invalid and unusable

How:

* Running `bundle exec slugs:gnerate` will look for all models that include the concern, and generate a slug for each object
