Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
CouchDB ORM for Ruby/Rails
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
features
lib
spec
vendor
.gitignore
LICENSE
README.md
Rakefile
VERSION
play.rb
recliner.gemspec

README.md

Recliner

Recliner is a Ruby ORM for interfacing with CouchDB databases.

It is designed to be familiar to users of ActiveRecord and DataMapper, but diverges where necessary to fit with the CouchDB document/view paradigm.

Installation

Recliner is distributed as a gem. Install with:

gem install recliner

Sample Usage

require 'recliner'

Recliner::Document.use_database 'http://localhost:5984/my-database-location'

class Article < Recliner::Document
  property :title, String, :default => 'Untitled'
  property :body, String
  property :published_at, Time, :protected => true
  property :approved, Boolean, :default => false, :protected => true
  timestamps!

  validates_presence_of :title, :body

  has :author, :class_name => 'User'

  default_order :published_at

  view :by_title, :order => :title
  view :approved, :conditions => { :approved => true }      
end
Something went wrong with that request. Please try again.