Module: ActiveLayer::Persistence

Extended by:
ActiveSupport::Concern
Includes:
Proxy
Included in:
ActiveRecord
Defined in:
lib/active_layer/persistence.rb

Overview

This module introduces save and update_attribute methods delegating to the proxy object

This module provides two hook methods to allow the including class to control how the attributes get set on the proxy object and how the proxy object gets saved.

Here are the defaults

def active_layer_save
  active_layer_object.save
end

def active_layer_attributes_setting(new_attributes)
  active_layer_object.attributes = new_attributes
end

Defined Under Namespace

Modules: InstanceMethods