Sha256: 0030764934f91494a6d56eb2f09acec7ec76728ca3cae454b5d5c993592df9da

Contents?: true

Size: 674 Bytes

Versions: 1

Compression:

Stored size: 674 Bytes

Contents

# Shôden

![Elephant god](http://www.redprintdna.com/wp-content/uploads/2011/09/L-Elephant-Against-Sky.jpg)

Shôden is a persistance library on top of Postgres.
It is basically an [Ohm](https://github.com/soveran/ohm) clone but using
Postgres as a main database.

## Installation

```bash
gem install shoden
```

## Models

```ruby
class Fruit < Shoden::Model
  attribute :type
end
```

```ruby
Fruit.create type: "Banana"
```

To find by an id:

```ruby
Fruit[1]
```

## Relations

```ruby
class User < Shoden::Model
  attribute :email

  collection :posts, :Post
end

class Post < Shoden::Model
  attribute :title
  attribute :content

  reference :owner, :User
end
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoden-0.2.0 README.md