Class: UiGroup
- Inherits:
-
Object
- Object
- UiGroup
- Includes:
- MongoMapper::Document, MongoMapper::Serialize
- Defined in:
- lib/question_chain/models/ui_group.rb
Overview
holds a group of ui objects basically keep simple to start of with
Class Method Summary collapse
Instance Method Summary collapse
- #css_classes ⇒ Object
-
#default_styles ⇒ Object
this should go into the mustache view basically.
Class Method Details
.attributes_for_api ⇒ Object
48 49 50 |
# File 'lib/question_chain/models/ui_group.rb', line 48 def self.attributes_for_api %w(id name label question_id relatable_category_filter ui_objects ui_attributes default_styles css_classes) end |
Instance Method Details
#css_classes ⇒ Object
63 64 65 |
# File 'lib/question_chain/models/ui_group.rb', line 63 def css_classes read_attribute(:css_classes).join(" ") end |
#default_styles ⇒ Object
this should go into the mustache view basically
53 54 55 56 57 58 59 60 61 |
# File 'lib/question_chain/models/ui_group.rb', line 53 def default_styles default_styles = "" self.ui_attributes.each_pair do |key, value| if key.to_s == "visible" && value == false default_styles << "display:none;visibility:hidden;" end end default_styles end |