Class: CarrierwaveActiverecordGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(dirname) ⇒ Object



10
11
12
# File 'lib/generators/carrierwave_activerecord_generator.rb', line 10

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

Instance Method Details

#create_migration_fileObject



16
17
18
# File 'lib/generators/carrierwave_activerecord_generator.rb', line 16

def create_migration_file
  migration_template 'create_carrierwave_files.rb', 'db/migrate/create_carrierwave_files.rb'
end