Sha256: c5c981261ebdfce449bd99663e76bafea5cd47bbfcb5fa9c9aa04630649d825e
Contents?: true
Size: 835 Bytes
Versions: 5
Compression:
Stored size: 835 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', '..', '..', 'active_graph.rb') module ActiveGraph module Generators class UpgradeV8Generator < ::Rails::Generators::Base include ::ActiveGraph::Generators::SourcePathHelper include ::ActiveGraph::Generators::MigrationHelper def create_upgrade_v8_file @schema = load_all_models_schema! migration_template 'migration.erb' end def file_name 'upgrate_to_v8' end private def load_all_models_schema! Rails.application.eager_load! initialize_all_models! ActiveGraph::ModelSchema.legacy_model_schema_informations end def initialize_all_models! models = ActiveGraph::Node.loaded_classes models.map(&:ensure_id_property_info!) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems