Class: Answers::UiObjectsObjectSearchView

Inherits:
UiObjectView show all
Defined in:
lib/question_chain/models/answers/ui_objects_object_search_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

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

#search_idObject



8
9
10
# File 'lib/question_chain/models/answers/ui_objects_object_search_view.rb', line 8

def search_id
  "search_#{dom_id()}"
end

#search_nameObject



4
5
6
# File 'lib/question_chain/models/answers/ui_objects_object_search_view.rb', line 4

def search_name
  "answer[search_#{name}]"
end

#search_valueObject



12
13
14
15
16
# File 'lib/question_chain/models/answers/ui_objects_object_search_view.rb', line 12

def search_value
  if answer_params
    answer_params["search_answer"][ui_object_name]
  end
end

#valueObject



18
19
20
# File 'lib/question_chain/models/answers/ui_objects_object_search_view.rb', line 18

def value
  super || default_value
end