Method: OldSql::InstallGenerator#check_for_devise

Defined in:
lib/generators/old_sql/install_generator.rb

#check_for_deviseObject



8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/generators/old_sql/install_generator.rb', line 8

def check_for_devise
  puts "Old SQL works with devise. Checking for a current installation of devise!\n"

  if defined?(Devise)
    check_for_devise_models
  else
    puts "Please put gem 'devise' into your Gemfile"
  end
  
  puts "Also you need a new migration. We'll generate it for you now."
  invoke 'old_sql:install_migrations', ["#{model_name}"]
end