class FriendlyIdGenerator
This generator adds a migration for the {FriendlyId::History FriendlyId::History} addon.
Public Instance Methods
copy_files()
click to toggle source
Copies the migration template to db/migrate.
# File lib/generators/friendly_id_generator.rb, line 17 def copy_files return if options['skip-migration'] migration_template 'migration.rb', 'db/migrate/create_friendly_id_slugs.rb' end
create_initializer()
click to toggle source
# File lib/generators/friendly_id_generator.rb, line 22 def create_initializer return if options['skip-initializer'] copy_file 'initializer.rb', 'config/initializers/friendly_id.rb' end