Sha256: 300abefa060878635403e2bf47203f0668e173e76eff839e14653947e1fb0fa9

Contents?: true

Size: 567 Bytes

Versions: 9

Compression:

Stored size: 567 Bytes

Contents

module ActiveRecord
  class Base
    class_attribute :__fields_keeper
    self.__fields_keeper = nil

    def self.__fields_keeper_instance
      self.__fields_keeper ||= ::Automigration::FieldsKeeper.new(self)
    end

    class << self
      delegate :has_fields, :add_field, :migration_attr, :to => :__fields_keeper_instance
      delegate :auto_migrable?, :migration_attrs, :to => :__fields_keeper_instance
      delegate :field_db_columns, :to => :__fields_keeper_instance
      delegate :fields, :field_names, :to => :__fields_keeper_instance
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
automigration-1.1.4 lib/automigration/active_record_ext.rb
automigration-1.1.3 lib/automigration/active_record_ext.rb
automigration-1.1.2 lib/automigration/active_record_ext.rb
automigration-1.1.1 lib/automigration/active_record_ext.rb
automigration-1.1.0 lib/automigration/active_record_ext.rb
automigration-1.0.3 lib/automigration/active_record_ext.rb
automigration-1.0.2 lib/automigration/active_record_ext.rb
automigration-1.0.1 lib/automigration/active_record_ext.rb
automigration-1.0.0 lib/automigration/active_record_ext.rb