lib/generators/audited/upgrade_generator.rb in velocity_audited-5.1.4 vs lib/generators/audited/upgrade_generator.rb in velocity_audited-5.1.5

- old
+ new

@@ -5,16 +5,16 @@ require "active_record" require "rails/generators/active_record" require "generators/audited/migration" require "generators/audited/migration_helper" -module Audited +module VelocityAudited module Generators class UpgradeGenerator < Rails::Generators::Base include Rails::Generators::Migration - include Audited::Generators::MigrationHelper - extend Audited::Generators::Migration + include VelocityAudited::Generators::MigrationHelper + extend VelocityAudited::Generators::Migration source_root File.expand_path("../templates", __FILE__) def copy_templates migrations_to_be_applied do |m| @@ -23,12 +23,12 @@ end private def migrations_to_be_applied - Audited::Audit.reset_column_information - columns = Audited::Audit.columns.map(&:name) - indexes = Audited::Audit.connection.indexes(Audited::Audit.table_name) + VelocityAudited::Audit.reset_column_information + columns = VelocityAudited::Audit.columns.map(&:name) + indexes = VelocityAudited::Audit.connection.indexes(VelocityAudited::Audit.table_name) yield :add_comment_to_audits unless columns.include?("comment") if columns.include?("changes") yield :rename_changes_to_audited_changes