Module: Wonkavision::Persistence::MongoMapperAdapter::ClassMethods
- Includes:
- ActsAsOompaLoompa
- Defined in:
- lib/wonkavision/persistence/mongo_mapper_adapter.rb
Instance Method Summary
collapse
#acts_as_business_activity, #acts_as_event_handler, #acts_as_timeline, #acts_like_a_child
Instance Method Details
#define_document_key(key_name, key_type, options = {}) ⇒ Object
12
13
14
|
# File 'lib/wonkavision/persistence/mongo_mapper_adapter.rb', line 12
def define_document_key(key_name,key_type,options={})
key(key_name, key_type, options) unless keys[key_name]
end
|
#find_activity_instance(correlation_field_name, correlation_id) ⇒ Object
21
22
23
|
# File 'lib/wonkavision/persistence/mongo_mapper_adapter.rb', line 21
def find_activity_instance(correlation_field_name,correlation_id)
self.send("find_or_create_by_#{correlation_field_name}",correlation_id)
end
|
#update_activity(activity, event_data) ⇒ Object
16
17
18
19
|
# File 'lib/wonkavision/persistence/mongo_mapper_adapter.rb', line 16
def update_activity(activity,event_data)
activity.assign(event_data)
:updated
end
|