blob: a081394c9a83e170e5169edf8a744e11d5d4e67a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
class Identity < CouchRest::Model::Base
use_database :identities
belongs_to :user
property :address
property :destination
def initialize(attribs = {}, &block):q
attribs.reverse_merge! user_id: user.id,
address: user.main_email_address,
destination: user.main_email_address
Identity.new attribs
end
design do
view :by_user_id
end
end
|