Class: SolidusAdmin::ReimbursementTypes::Index::Component

Inherits:
SolidusAdmin::RefundsAndReturns::Component
  • Object
show all
Defined in:
app/components/solidus_admin/reimbursement_types/index/component.rb

Instance Method Summary collapse

Instance Method Details

#columnsObject



16
17
18
19
20
21
22
23
24
25
26
# File 'app/components/solidus_admin/reimbursement_types/index/component.rb', line 16

def columns
  [
    :name,
    {
      header: :active,
      data: ->(reimbursement_type) do
        reimbursement_type.active? ? component('ui/badge').yes : component('ui/badge').no
      end
    },
  ]
end

#model_classObject



4
5
6
# File 'app/components/solidus_admin/reimbursement_types/index/component.rb', line 4

def model_class
  Spree::ReimbursementType
end

#search_keyObject



12
13
14
# File 'app/components/solidus_admin/reimbursement_types/index/component.rb', line 12

def search_key
  :name_cont
end

#search_urlObject



8
9
10
# File 'app/components/solidus_admin/reimbursement_types/index/component.rb', line 8

def search_url
  solidus_admin.reimbursement_types_path
end