auditable
auditable copied to clipboard
Allow for nested attributes for audit
Allow for nested attributes for an audit. Since the trailing hash is expected to the options, maybe by passing in a block? Something along the lines of:
audit :before_create => :create_audit_callback do
audit_attr :name, :arg, :lumox
audit_attr :user, [:name, :login_at]
audit_attr :notifications, { :messages => [:title, :sender] }
audit_attr :cart, { :items => { :inventory => :price } }
end
-
audit_attr :name, :arg, :lumox- Would allow attributes for the model to be added by array -
audit_attr :user, [:name, :login_at]- Would allow the user attribute to specify what attributes should be serialized by array -
audit_attr :notifications, { :messages => [:title, :sender] }- Would allow the nested attribute (:messages) to specify what should be serialized. -
audit_attr :cart, { :items => { :inventory => :price } }- Would allow to specify attributes as an array or single symbol (:inventory)
+1