riak-ripple / ripple

A rich Ruby modeling layer for Riak, Basho's distributed database
Other
618 stars 152 forks source link

non database attribute validation #295

Open jney opened 12 years ago

jney commented 12 years ago

Isn't validation supposed to validate either attributes who aren't stored in riak ? It seems they are not.

require 'ripple'

class User
  include Ripple::Document
   attr_accessor :password   
   validates :password, presence: true, on: :create
end

u = User.new
u.new? #=> true
u.valid? #=> true