Class: AskIt::QuestionType

Inherits:
Object
  • Object
show all
Defined in:
app/models/ask_it/question_type.rb

Constant Summary collapse

@@questions_types =
{ multiple_choice: 2, free_response: 9, multi_select: 1 }

Class Method Summary collapse

Class Method Details

.questions_type_idsObject



18
19
20
# File 'app/models/ask_it/question_type.rb', line 18

def self.questions_type_ids
  @@questions_types.values
end

.questions_type_keysObject



22
23
24
# File 'app/models/ask_it/question_type.rb', line 22

def self.questions_type_keys
  @@questions_types.keys
end

.questions_typesObject



8
9
10
# File 'app/models/ask_it/question_type.rb', line 8

def self.questions_types
  @@questions_types
end

.questions_types_titleObject



12
13
14
15
16
# File 'app/models/ask_it/question_type.rb', line 12

def self.questions_types_title
  titled = {}
  AskIt::QuestionType.questions_types.each { |k, v| titled[k.to_s.titleize] = v }
  titled
end