Skip to content
Browse files

Pulled caching out of the ActiveRecord adapter.

  • Loading branch information...
1 parent 2839888 commit d175c92911090a8e37ad17387da76a6c5b96ea1e @notahat notahat committed Feb 25, 2011
Showing with 0 additions and 25 deletions.
  1. +0 −25 lib/machinist/active_record/blueprint.rb
View
25 lib/machinist/active_record/blueprint.rb
@@ -8,31 +8,6 @@ def make!(attributes = {})
object.reload
end
- # Box an object for storage in the warehouse.
- def box(object)
- object.id
- end
-
- # Unbox an object from the warehouse.
- def unbox(id)
- @klass.find(id)
- end
-
- # Execute a block on a separate database connection, so that any database
- # operations happen outside any open transactions.
- def outside_transaction
- # ActiveRecord manages connections per-thread, so the only way to
- # convince it to open another connection is to start another thread.
- thread = Thread.new do
- begin
- yield
- ensure
- ::ActiveRecord::Base.connection_pool.checkin(::ActiveRecord::Base.connection)
- end
- end
- thread.value
- end
-
def lathe_class #:nodoc:
Machinist::ActiveRecord::Lathe
end

0 comments on commit d175c92

Please sign in to comment.
Something went wrong with that request. Please try again.