Class: PaperTrail::InstallGenerator
- Inherits:
-
MigrationGenerator
- Object
- Rails::Generators::Base
- MigrationGenerator
- PaperTrail::InstallGenerator
- Defined in:
- lib/generators/paper_trail/install/install_generator.rb
Overview
Installs PaperTrail in a rails app.
Constant Summary collapse
- MYSQL_ADAPTERS =
Class names of MySQL adapters.
-
‘MysqlAdapter` - Used by gems: `mysql`, `activerecord-jdbcmysql-adapter`.
-
‘Mysql2Adapter` - Used by `mysql2` gem.
-
[ "ActiveRecord::ConnectionAdapters::MysqlAdapter", "ActiveRecord::ConnectionAdapters::Mysql2Adapter" ].freeze
Instance Method Summary collapse
Methods inherited from MigrationGenerator
Instance Method Details
#create_migration_file ⇒ Object
27 28 29 30 31 32 |
# File 'lib/generators/paper_trail/install/install_generator.rb', line 27 def create_migration_file add_paper_trail_migration("create_versions", item_type_options: , versions_table_options: ) add_paper_trail_migration("add_object_changes_to_versions") if .with_changes? end |