Class: Rails::Contact::Generators::ContactGenerator
- Inherits:
-
Generators::NamedBase
- Object
- Generators::NamedBase
- Rails::Contact::Generators::ContactGenerator
- Includes:
- Generators::Migration
- Defined in:
- lib/generators/rails/contact/contact_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
12 13 14 |
# File 'lib/generators/rails/contact/contact_generator.rb', line 12 def self.next_migration_number(dirname) ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#copy_migrations ⇒ Object
20 21 22 23 24 25 |
# File 'lib/generators/rails/contact/contact_generator.rb', line 20 def copy_migrations migration_template "create_rails_contact_contacts.rb.tt", "db/migrate/create_rails_contact_contacts.rb" migration_template "create_rails_contact_contact_emails.rb.tt", "db/migrate/create_rails_contact_contact_emails.rb" migration_template "create_rails_contact_contact_phones.rb.tt", "db/migrate/create_rails_contact_contact_phones.rb" migration_template "create_rails_contact_contact_addresses.rb.tt", "db/migrate/create_rails_contact_contact_addresses.rb" end |
#create_initializer ⇒ Object
16 17 18 |
# File 'lib/generators/rails/contact/contact_generator.rb', line 16 def create_initializer invoke "rails:contact:install" end |