Class: Survey::OptionsType

Inherits:
Object
  • Object
show all
Defined in:
app/models/survey/options_type.rb

Constant Summary collapse

@@options_types =
{:multi_choices => 1, 
:single_choice => 2, 
:number => 3, 
:text => 4, 
:multi_choices_with_text => 5, 
:single_choice_with_text => 6,
:multi_choices_with_number => 7, 
:single_choice_with_number => 8,
:large_text => 9}

Class Method Summary collapse

Class Method Details

.options_type_idsObject



22
23
24
# File 'app/models/survey/options_type.rb', line 22

def self.options_type_ids
  @@options_types.values
end

.options_type_keysObject



26
27
28
# File 'app/models/survey/options_type.rb', line 26

def self.options_type_keys
  @@options_types.keys
end

.options_typesObject



12
13
14
# File 'app/models/survey/options_type.rb', line 12

def self.options_types
  @@options_types
end

.options_types_titleObject



16
17
18
19
20
# File 'app/models/survey/options_type.rb', line 16

def self.options_types_title
  titled = {}
  Survey::OptionsType.options_types.each{|k, v| titled[k.to_s.titleize] = v}
  titled
end