Class: FriendlyIdGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Extended by:
ActiveRecord::Generators::Migration
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/friendly_id_generator.rb

Overview

This generator adds a migration for the FriendlyId::History addon.

Instance Method Summary (collapse)

Instance Method Details

- (Object) copy_files(*args)

Copies the migration template to db/migrate.



13
14
15
# File 'lib/generators/friendly_id_generator.rb', line 13

def copy_files(*args)
  migration_template 'migration.rb', 'db/migrate/create_friendly_id_slugs.rb'
end