Class: Zlookup
- Inherits:
-
Object
- Object
- Zlookup
- Defined in:
- app/models/zlookup.rb
Overview
Zlookup pattern copied from ERA to allow easy integration of Engine with ERA
Direct Known Subclasses
Class Method Summary collapse
Class Method Details
.valid_value?(key, strict = false) ⇒ Boolean
4 5 6 7 8 |
# File 'app/models/zlookup.rb', line 4 def self.valid_value?(key, strict = false) return true if key.blank? scope = strict ? current : self scope.where(primary_key => key).count == 1 end |