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 bymysql2gem.
-
[ "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 33 34 35 36 |
# 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: ) if .with_changes? add_paper_trail_migration("add_object_changes_to_versions") end end |