Class: Headmin::Form::LabelView

Inherits:
ViewModel show all
Defined in:
app/models/headmin/form/label_view.rb

Instance Method Summary collapse

Methods inherited from ViewModel

#attributes, #initialize, #to_hash

Constructor Details

This class inherits a constructor from ViewModel

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ViewModel

Instance Method Details

#formObject



4
5
6
# File 'app/models/headmin/form/label_view.rb', line 4

def form
  @form.object_id
end

#optionsObject



8
9
10
11
12
# File 'app/models/headmin/form/label_view.rb', line 8

def options
  keys = attributes - %i[attribute form text]
  options = to_h.slice(*keys)
  default_options.deep_merge(options)
end