Sha256: 7faa94d49ce283fffc854e549ff3a9cea6f1e6813cb2e90f4dce2f3177234c8b
Contents?: true
Size: 842 Bytes
Versions: 9
Compression:
Stored size: 842 Bytes
Contents
class AuditLogType < ActiveRecord::Base attr_protected :created_at, :updated_at acts_as_nested_set include ErpTechSvcs::Utils::DefaultNestedSetMethods acts_as_erp_type has_many :audit_logs belongs_to_erp_type :parent, :class_name => "AuditLogType" # find by type Internal Identifier and subtype Internal Identifier def self.find_by_type_and_subtype_iid(txn_type, txn_subtype) result = nil txn_type_recs = find_all_by_internal_identifier(txn_type.strip) txn_type_recs.each do |txn_type_rec| txn_subtype_rec = find_by_parent_id_and_internal_identifier(txn_type_rec.id, txn_subtype.strip) result = txn_subtype_rec unless txn_subtype_rec.nil? result = txn_subtype_rec break end end unless txn_type_recs.blank? result end end
Version data entries
9 entries across 9 versions & 1 rubygems