Sha256: 3767560477aff7e7b6d6586d5b2fc289a61d9d77058064724f5cbf4acb94972f

Contents?: true

Size: 1.34 KB

Versions: 1

Compression:

Stored size: 1.34 KB

Contents

[![Code Climate](https://codeclimate.com/repos/52c08442e30ba01f880060b4/badges/c2bac2dcd240649516e4/gpa.png)](https://codeclimate.com/repos/52c08442e30ba01f880060b4/feed)
[![Build Status](https://travis-ci.org/frankjmattia/active_connection.png?branch=master)](https://travis-ci.org/frankjmattia/active_connection)
[![Coverage Status](https://coveralls.io/repos/frankjmattia/active_connection/badge.png?branch=master)](https://coveralls.io/r/frankjmattia/active_connection?branch=master)
[![Dependency Status](https://gemnasium.com/frankjmattia/active_connection.png)](https://gemnasium.com/frankjmattia/active_connection)

# ActiveConnection

ActiveConnection is a simple wrapper around ActiveRecord::Base.connection.schema_search_path.

## Installation

Add this line to your application's Gemfile:

    gem 'active_connection'

And then execute:

    $ bundle

## Usage

Useful in multi-tenant situations where you have a user table in the public schema and a separate schema for each tenants data.

```ruby
ActiveConnection.schema_search_path('other_schema', 'public') do
  # Do something that depends on other_schema
end
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_connection-0.0.1 README.md