Class: UuidGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- UuidGenerator
- Defined in:
- lib/generators/uuid_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
7 8 9 |
# File 'lib/generators/uuid_generator.rb', line 7 def self.source_root @source_root ||= File.('../templates', __FILE__) end |
Instance Method Details
#generate_migration ⇒ Object
11 12 13 |
# File 'lib/generators/uuid_generator.rb', line 11 def generate_migration migration_template "uuid_migration.rb.erb", "db/migrate/#{migration_file_name}" end |