Class: Item

Inherits:
ApplicationRecord show all
Includes:
Discard::Model
Defined in:
app/models/item.rb

Overview

Represents a psychometric item Similar to a question with metadata

Instance Method Summary collapse

Methods inherited from ApplicationRecord

#==

Instance Method Details

#find_choice_by_value(value) ⇒ Object


44
45
46
# File 'app/models/item.rb', line 44

def find_choice_by_value(value)
  choices.find_by(response_scale: response_scale, value: value)
end

#to_sObject


48
49
50
# File 'app/models/item.rb', line 48

def to_s
  name
end