Method: Rules::PopulateDropDown#get_options

Defined in:
lib/question_chain/models/rules/populate_drop_down.rb

#get_options(object_ids = []) ⇒ Object

ask the parent document to get the options



17
18
19
20
21
22
23
# File 'lib/question_chain/models/rules/populate_drop_down.rb', line 17

def get_options(object_ids = [])
  options = []
  _parent_document.get_target_drop_down_options(object_ids).each_pair do |key ,value|
    options << {:name => value, :value => key}
  end
  options.sort_by{|option| option[:name]}
end