Class: AskIt::OptionsType

Inherits:
Object
  • Object
show all
Defined in:
app/models/ask_it/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



25
26
27
# File 'app/models/ask_it/options_type.rb', line 25

def self.options_type_ids
  @@options_types.values
end

.options_type_keysObject



29
30
31
# File 'app/models/ask_it/options_type.rb', line 29

def self.options_type_keys
  @@options_types.keys
end

.options_typesObject



15
16
17
# File 'app/models/ask_it/options_type.rb', line 15

def self.options_types
  @@options_types
end

.options_types_titleObject



19
20
21
22
23
# File 'app/models/ask_it/options_type.rb', line 19

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