Class: Strongbolt::Generators::FixGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Strongbolt::Generators::FixGenerator
- Includes:
- Migration
- Defined in:
- lib/generators/strongbolt/fix_generator.rb
Overview
Creates a migration to fix a has many through with users tenants problem
Instance Method Summary collapse
Methods included from Migration
Instance Method Details
#copy_fix ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/generators/strongbolt/fix_generator.rb', line 13 def copy_fix if Strongbolt::UsersTenant.primary_key.nil? copy_migration 'fix', 'fix_strongbolt_users_tenants_id' else puts 'Strongbolt::UsersTenant already has a primary key, no need to use the fix' end end |