Class: Pah::Templates::Database
- Inherits:
-
Pah::Template
- Object
- Rails::Generators::Base
- Pah::Template
- Pah::Templates::Database
- Defined in:
- lib/pah/templates/database.rb
Instance Method Summary collapse
Methods inherited from Pah::Template
#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?
Instance Method Details
#call ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/pah/templates/database.rb', line 4 def call copy_static_file 'config/database.yml' gsub_file 'config/database.yml', /PROJECT/, Pah.configuration.app_name git add: 'config/database.yml' git_commit 'Add config/database.yml.' run 'bundle exec rake db:create db:migrate' git add: 'db/schema.rb' git_commit 'Create database, adding db/schema.rb.' end |