Class: Olivander::Resources::ResourceFields::ResourceFieldSection

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/concerns/olivander/resources/auto_form_attributes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#columnsObject

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

#fieldsObject

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_classObject



144
145
146
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 144

def column_class
  "col-md-#{12/columns}"
end