class Strongbolt::Generators::FixGenerator

Creates a migration to fix a has many through with users tenants problem

Public Instance Methods

copy_fix() click to toggle source
# 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