Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (31 loc) · 715 Bytes

Readme.md

File metadata and controls

43 lines (31 loc) · 715 Bytes

A simple MongoDB adapter.

Forks and pull requests with fixes and improvements are really well welcome! This is pretty much beta and not ready for production.

Documentation coming soon!

Install

Not in RubyGems yet

Usage

class MyTestClass
  include SimpleMongo::Model
  field :test
  
  validations do 
    validates_custom :test do |field|
      field == "something"      
    end
  end
  
  before_save do
    self.test = 'pablo'
  end
end

connection = SimpleMongo::Connection.new(:database => 'test')

model = MyTestClass.new(:test => 'yay')

model.save

puts model.test

Author

Pablo Merino
[email protected]
License: MIT