Class: Recorder::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Recorder::InstallGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/recorder/install_generator.rb
Overview
Installs Recorder in a rails app.
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
43 44 45 |
# File 'lib/generators/recorder/install_generator.rb', line 43 def self.next_migration_number(dirname) ::ActiveRecord::Generators::Base.next_migration_number(dirname) end |
Instance Method Details
#create_migration_file ⇒ Object
36 37 38 39 40 41 |
# File 'lib/generators/recorder/install_generator.rb', line 36 def create_migration_file add_or_skip_recorder_migration('create_recorder_revisions') add_or_skip_recorder_migration('add_number_column_to_recorder_revisions') if .with_number_column? add_or_skip_recorder_migration('add_index_by_user_id_to_recorder_revisions') if .with_index_by_user_id? add_or_skip_recorder_migration('add_partitions_to_recorder_revisions') if .with_partitions? end |