Class: Headmin::Filter::BaseView
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
22
23
24
25
26
|
# File 'app/models/headmin/filter/base_view.rb', line 22
def filter_button_options
keys = %i[name label display_values filter]
options = to_h.slice(*keys)
default_filter_button_options.merge(options)
end
|
#filter_operator_options ⇒ Object
16
17
18
19
20
|
# File 'app/models/headmin/filter/base_view.rb', line 16
def filter_operator_options
keys = %i[allowed_operators]
options = to_h.slice(*keys)
default_filter_operator_options.merge(options)
end
|
#filter_template_options ⇒ Object
10
11
12
13
14
|
# File 'app/models/headmin/filter/base_view.rb', line 10
def filter_template_options
keys = %i[name label]
options = to_h.slice(*keys)
default_filter_template_options.merge(options)
end
|
#label ⇒ Object
28
29
30
|
# File 'app/models/headmin/filter/base_view.rb', line 28
def label
@label || name.to_s.humanize
end
|
4
5
6
7
8
|
# File 'app/models/headmin/filter/base_view.rb', line 4
def
keys = %i[name label]
options = to_h.slice(*keys)
.merge(options)
end
|