Class: Spree::Seeds::AllowedOrigins

Inherits:
Object
  • Object
show all
Includes:
Spree::ServiceModule::Base
Defined in:
app/services/spree/seeds/allowed_origins.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/allowed_origins.rb', line 6

def call
  store = Spree::Store.default
  return unless store&.persisted?

  store.allowed_origins.find_or_create_by!(origin: 'http://localhost')
end