Class: Spree::Seeds::StoreCreditCategories

Inherits:
Object
  • Object
show all
Includes:
Spree::ServiceModule::Base
Defined in:
app/services/spree/seeds/store_credit_categories.rb

Instance Method Summary collapse

Methods included from Spree::ServiceModule::Base

prepended

Instance Method Details

#callObject



6
7
8
9
10
11
# File 'app/services/spree/seeds/store_credit_categories.rb', line 6

def call
  # FIXME: we should use translations here
  Spree::StoreCreditCategory.find_or_create_by!(name: 'Default')
  Spree::StoreCreditCategory.find_or_create_by!(name: 'Non-expiring')
  Spree::StoreCreditCategory.find_or_create_by!(name: 'Expiring')
end