Sha256: e860a5f3e895b1f8c997176c7a6e7993668a06259facbb0368b89ff42fcb6e2c
Contents?: true
Size: 618 Bytes
Versions: 12
Compression:
Stored size: 618 Bytes
Contents
# frozen_string_literal: true # # Base AuditLog class, changes made outside of users # class AuditLog include StandardModel include SearchAble # # Constants # CREATE_ACTION = 'create' unless defined? CREATE_ACTION UPDATE_ACTION = 'update' unless defined? UPDATE_ACTION DELETE_ACTION = 'delete' unless defined? DELETE_ACTION ALL_ACTIONS = [CREATE_ACTION, UPDATE_ACTION, DELETE_ACTION].freeze unless defined? ALL_ACTIONS # # Fields # field :action, type: String # # Validations # validates :action, inclusion: { in: ALL_ACTIONS } def self.sort_order [:created_at, -1] end end
Version data entries
12 entries across 12 versions & 1 rubygems