ncbo / goo

Graph Oriented Objects (GOO) for Ruby. A RDF/SPARQL based ORM.
http://ncbo.github.io/goo/
Other
15 stars 6 forks source link

instance_of validation #7

Closed msalvadores closed 11 years ago

msalvadores commented 11 years ago

We need to configure models with the following:

validates :hasContact, :instance_of => :contact_details

To enforce that in

 object.hasContact << inst

inst is type of Contact. Where Contact is a the :contact_details model.

msalvadores commented 11 years ago

Enable instance_of using classes not just model symbols:

`validates :numbers , :instance_of => { :with => Fixnum }`