Class: SpinaBlog::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/spina_admin_conferences_blog/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_migrationsObject



5
6
7
8
9
# File 'lib/generators/spina_admin_conferences_blog/install_generator.rb', line 5

def copy_migrations
  return if Rails.env.production?

  rake 'spina_conferences_blog:install:migrations'
end

#feedbackObject



15
16
17
18
19
20
21
22
# File 'lib/generators/spina_admin_conferences_blog/install_generator.rb', line 15

def feedback
  puts
  puts '    Spina Conferences Blog has been succesfully installed! '
  puts
  puts '    Restart your server and visit http://localhost:3000 in your browser!'
  puts "    The admin backend is located at http://localhost:3000/#{Spina.config.backend_path}."
  puts
end

#run_migrationsObject



11
12
13
# File 'lib/generators/spina_admin_conferences_blog/install_generator.rb', line 11

def run_migrations
  rake 'db:migrate'
end