Class: UpdateableViewsInheritance::Generators::InstallGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object

Implement the required interface for Rails::Generators::Migration



14
15
16
# File 'lib/generators/updateable_views_inheritance/install_generator.rb', line 14

def self.next_migration_number(dirname)
  ActiveRecord::Generators::Base.next_migration_number(dirname)
end

Instance Method Details

#installObject



18
19
20
21
# File 'lib/generators/updateable_views_inheritance/install_generator.rb', line 18

def install
  migration_file = "create_updateable_views_inheritance.rb"
  migration_template migration_file, "db/migrate/#{migration_file}"
end