No commit activity in last 3 years
No release in over 3 years
Account related models within mongoid
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.8.3
~> 2.1.0

Runtime

~> 3.0.4
 Project Readme

MongoidAccountify

MongoidAccountify adds a relation to models to a Account model and sets it on model initialization.

Install

gem 'mongoid_accountify'

Usage

# Default config
Mongoid::Accountify.configure do |c|
  c.account_reader = :current_account
  c.account_model = :account
  c.account_relation = :account
end

# Example model
class Person
  include Mongoid::Document
  include Mongoid::Accountify
end

# Build instance
p = Person.new

# Account instance
p.account
# => <Account _id: 50470dce6f51b7c68e000009>

Credits

Copyright (c) 2012 Mathias Schneider http://www.codecrafts.de