Module | CouchPotato::Persistence::Properties::ClassMethods |
In: |
lib/couch_potato/persistence/properties.rb
|
Declare a proprty on a model class. properties are not typed by default. You can use any of the basic types by JSON (String, Integer, Fixnum, Array, Hash). If you want a property to be of a custom class you have to define it using the :class option.
example:
class Book property :title property :year property :publisher, :class => Publisher end