Class: Observation::Qualitative

Inherits:
Observation
  • Object
show all
Defined in:
app/models/observation/qualitative.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) character_state_is_unique (protected)



10
11
12
13
14
# File 'app/models/observation/qualitative.rb', line 10

def character_state_is_unique
  if Observation::Qualitative.object_scope(observation_object).where(character_state_id: character_state_id, descriptor_id: descriptor_id).any?
    errors.add(:character_state_id, ' is already observed')
  end
end