Sha256: 237734216d6082a1ba658c3a8d9a501f1d814387b170fbb53a855fa76ef2044f

Contents?: true

Size: 683 Bytes

Versions: 26

Compression:

Stored size: 683 Bytes

Contents

module Foobara
  module Persistence
    class << self
      def reset_all
        @tables_for_entity_class_name = @bases = @default_crud_driver = @default_base = nil
        EntityBase::Transaction::Concerns::EntityCallbackHandling.reset_all
        EntityBase::Transaction.reset_all

        Util.descendants(Foobara::Entity).each do |entity_class|
          if entity_class.instance_variable_defined?(:@entity_base)
            entity_class.remove_instance_variable(:@entity_base)
          end
        end
      end

      def install!
        EntityBase::Transaction::Concerns::EntityCallbackHandling.install!
        EntityBase::Transaction.install!
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.25 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.24 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.23 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.22 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.21 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.20 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.19 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.18 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.17 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.16 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.15 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.14 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.13 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.12 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.11 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.10 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.9 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.8 projects/persistence/lib/foobara/persistence.rb
foobara-0.0.7 projects/persistence/lib/foobara/persistence.rb