Class: AuditLogType
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AuditLogType
- Defined in:
- app/models/audit_log_type.rb
Class Method Summary collapse
-
.find_by_type_and_subtype_iid(txn_type, txn_subtype) ⇒ Object
find by type Internal Identifier and subtype Internal Identifier.
Methods included from ErpTechSvcs::Utils::DefaultNestedSetMethods
included, #leaf, #to_json_with_leaf, #to_label, #to_tree_hash
Class Method Details
.find_by_type_and_subtype_iid(txn_type, txn_subtype) ⇒ Object
find by type Internal Identifier and subtype Internal Identifier
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/models/audit_log_type.rb', line 11 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 |