Class: Headmin::Filter::ConditionalView

Inherits:
ViewModel
  • Object
show all
Defined in:
app/models/headmin/filter/conditional_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

#selectedObject



4
5
6
# File 'app/models/headmin/filter/conditional_view.rb', line 4

def selected
  @selected ? "+#{@selected.to_s.upcase}+" : nil
end

#valuesObject



8
9
10
11
12
13
# File 'app/models/headmin/filter/conditional_view.rb', line 8

def values
  {
    "+AND+": I18n.t("headmin.filters.filter.conditional.and"),
    "+OR+": I18n.t("headmin.filters.filter.conditional.or")
  }
end