class GenerateSlugsForExistingTags < ActiveRecord::Migration
  class MigrationTag < ActiveRecord::Base
    self.table_name = "tags"

    extend FriendlyId

    friendly_id :name
  end

  def change
    MigrationTag.find_each do |t|
      t.save!
    end
  end
end

Add migration to add slugs to existing tags
Add migration to add slugs to existing tags

This will likely raise exceptions for any tag matching the reserved
FriendlyId keywords so we need to address that too:

config.reserved_words = %w(new edit index session login logout users admin stylesheets assets javascripts images)
