Class: DeviseFidoUsf::Generators::MigrateGenerator
- Inherits:
-
ActiveRecord::Generators::Base
- Object
- ActiveRecord::Generators::Base
- DeviseFidoUsf::Generators::MigrateGenerator
- Defined in:
- lib/generators/devise_fido_usf/migrate_generator.rb
Instance Method Summary collapse
Instance Method Details
#copy_fido_usf_device_migration ⇒ Object
12 13 14 |
# File 'lib/generators/devise_fido_usf/migrate_generator.rb', line 12 def copy_fido_usf_device_migration migration_template "migration.rb", "db/migrate/create_#{table_name}.rb", migration_version: migration_version end |
#migration_version ⇒ Object
20 21 22 23 24 |
# File 'lib/generators/devise_fido_usf/migrate_generator.rb', line 20 def migration_version if rails5? "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" end end |
#rails5? ⇒ Boolean
16 17 18 |
# File 'lib/generators/devise_fido_usf/migrate_generator.rb', line 16 def rails5? Rails.version.start_with? '5' end |