Class: Answers::UiObjectsDropDownView
- Inherits:
-
UiObjectView
- Object
- Mustache
- MustacheRails
- UiObjectView
- Answers::UiObjectsDropDownView
- Defined in:
- lib/question_chain/models/answers/ui_objects_drop_down_view.rb
Instance Method Summary collapse
Methods inherited from UiObjectView
#css_classes, #default_styles, #default_value, #disabled, #dom_id, #extra_info, #has_extra_info, #input_id, #label, #name, #ui_object_name, #value
Methods inherited from MustacheRails
#initialize, #method_missing, #render, #respond_to?, #template=
Constructor Details
This class inherits a constructor from MustacheRails
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class MustacheRails
Instance Method Details
#options ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/question_chain/models/answers/ui_objects_drop_down_view.rb', line 8 def if answer_params ui_object..map{|option| option.merge!(:selected => option["value"].to_s == value.to_s)} else ui_object. end end |
#prompt ⇒ Object
4 5 6 |
# File 'lib/question_chain/models/answers/ui_objects_drop_down_view.rb', line 4 def prompt ui_object.prompt end |