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

SimpleMongo is a gem which acts as a MongoDB driver for easy MongoDB set up

Notifications You must be signed in to change notification settings

Pablo-Merino/SimpleMongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

SimpleMongo is a gem which acts as a MongoDB driver for easy MongoDB set up

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages