_ . _
      + | +

¤¤        |        ¤¤

        ^
     ¤     ¤
  ^           ^
.   .   .   .   .
RIPPLE OH CARAMBA
'   '   '   '   '
'   '   '   '   '
    '       '
'       '       '
    o       o

~   additions   ~
     for the
       orm
  called ripple
      using
       the
«   riak database   »
   .    .    .                       .

   (  it is  )
 .    great    .       .                 .
        .                          .
'       '       '
.       '       .             +
        .
                                       .
anyway..               .

$ gem install ripple_oh_caramba      .
                                                .
require 'ripple_oh_caramba'      +
                                  _      .
                                 ' )
// this gives ripple some new     o
   DSL methods...                (_.
                             .          +
                                    .

// REFERENTIAL ASSOCIATION

reference_one :email_confirmation
# set up referential accessor and a property
# called :email_confirmation_key

reference_many :sessions
# set up referential accessor based a hash
# of keys in the :session_keys property

// MUTUAL ASSOCIATION

reference_one_mutual :wife, :as => :husband, :class => Wife
# updates are automatically applied to both ends

reference_many_mutual :friends, :as => :friends, :class => self

// TOKENS FOR SIGNUP ETC

token_key! { ActiveSupport::SecureRandom.urlsafe_base64(16) }
# add a field called :token with the provided proc for
# default value, or the proc above if none is provided, and
# key_on that field.

token :yaya
# add a token called yaya, without keying on it.


(( DISCLAIMER ))

THE RIPPLE_OH_CARAMBA GEM WAS NOT WRITTEN TO BE PARTICULARLY
DURABLE OR OF HIGH QUALITY, BUT AS AN EXPERIMENT.

~~  feel free to contribute  ~~
  • Copyright (c) 2011 Jostein Berre Eliassen. See LICENSE.txt for details.