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.



147
148
149
150
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 147

def initialize(columns = 1)
  self.columns = columns
  self.fields = []
end

Instance Attribute Details

#columnsObject

Returns the value of attribute columns.



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

def columns
  @columns
end

#fieldsObject

Returns the value of attribute fields.



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

def fields
  @fields
end

Instance Method Details

#column_classObject



152
153
154
# File 'app/controllers/concerns/olivander/resources/auto_form_attributes.rb', line 152

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