kebab-project/server-ror — Issue #112: Thread closure of connection that's why TenantScoped couldn't worked.
Author: onurozgurozkan
Created: 2012-02-06 01:00:27+00:00
State: open
Labels: bug, future

* https://gist.github.com/1648523#file_active+record

Automatic closure of connections in threads is deprecated. For example
the following code is deprecated:
```ruby
Thread.new { Post.find(1) }.join
```
It should be changed to close the database connection at the end of
the thread:

```ruby
Thread.new {
Post.find(1)
Post.connection.close
}.join
```
Only people who spawn threads in their application code need to worry
about this change.