Class: Rspec::PaperTrail::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Rspec::PaperTrail::InstallGenerator
- Extended by:
- ActiveRecord::Generators::Migration
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/rspec/paper_trail/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_configuration_files ⇒ Object
25 26 27 |
# File 'lib/generators/rspec/paper_trail/install_generator.rb', line 25 def generate_configuration_files copy_file 'features/versioning.rb', 'config/features/versioning.rb' end |
#generate_migration_file ⇒ Object
17 18 19 20 21 |
# File 'lib/generators/rspec/paper_trail/install_generator.rb', line 17 def generate_migration_file return if .send(:'skip-migrations') migration_template 'migrations/create_versions.rb.erb', 'db/migrate/create_versions.rb' migration_template 'migrations/stringify_versions_item_id.rb', 'db/migrate/stringify_versions_item_id.rb' if use_string_ids? && connected? && migrated? && !has_integer_column? end |