Class: Answers::UiObjectsCheckBoxView

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

#checkedObject



8
9
10
11
12
13
14
# File 'lib/question_chain/models/answers/ui_objects_check_box_view.rb', line 8

def checked
  if value 
    !value.nil?
  else 
    ui_object.ui_attributes[:checked]
  end
end

#valueObject



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

def value
  super || default_value
end