Class: Olivander::Resources::ResourceFields::ResourceFieldSection
- Inherits:
-
Object
- Object
- Olivander::Resources::ResourceFields::ResourceFieldSection
- Defined in:
- app/controllers/concerns/olivander/resources/auto_form_attributes.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#fields ⇒ Object
Returns the value of attribute fields.
Instance Method Summary collapse
- #column_class ⇒ Object
-
#initialize(columns = 1) ⇒ ResourceFieldSection
constructor
A new instance of ResourceFieldSection.
Constructor Details
#initialize(columns = 1) ⇒ ResourceFieldSection
Returns a new instance of ResourceFieldSection.
139 140 141 142 |
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 139 def initialize(columns = 1) self.columns = columns self.fields = [] end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
137 138 139 |
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 137 def columns @columns end |
#fields ⇒ Object
Returns the value of attribute fields.
137 138 139 |
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 137 def fields @fields end |
Instance Method Details
#column_class ⇒ Object
144 145 146 |
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 144 def column_class "col-md-#{12/columns}" end |