Class: Cats::Core::StackingRule
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Cats::Core::StackingRule
- Defined in:
- app/models/cats/core/stacking_rule.rb
Instance Method Summary collapse
Instance Method Details
#validate_only_a_record_exist ⇒ Object
8 9 10 11 12 13 |
# File 'app/models/cats/core/stacking_rule.rb', line 8 def validate_only_a_record_exist return unless StackingRule.count > 1 errors.add(:base, "There is already a stacking rule entry. A new rule can not be added") end |