Sha256: e437114d6da30989eb5ff298e613abdae45c2d751e6e64b9be9c45b1ee4b26bd

Contents?: true

Size: 437 Bytes

Versions: 10

Compression:

Stored size: 437 Bytes

Contents

require 'active_utils'

class DiscoApp::Shop < ApplicationRecord
  include DiscoApp::Concerns::Shop

  has_one :js_configuration
  has_one :widget_configuration
  has_many :carts
  has_many :products

  # Extend the Shop model to return the Shop's country as an ActiveUtils country.
  def country
    begin
      ActiveUtils::Country.find(data[:country_name])
    rescue ActiveUtils::InvalidCountryCodeError
      nil
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
disco_app-0.16.1.pre.sidekiq.pre.6.pre.release test/dummy/app/models/disco_app/shop.rb
disco_app-0.14.1 test/dummy/app/models/disco_app/shop.rb
disco_app-0.14.2 test/dummy/app/models/disco_app/shop.rb
disco_app-0.15.0 test/dummy/app/models/disco_app/shop.rb
disco_app-0.16.0 test/dummy/app/models/disco_app/shop.rb
disco_app-0.14.4 test/dummy/app/models/disco_app/shop.rb
disco_app-0.14.3 test/dummy/app/models/disco_app/shop.rb
disco_app-0.16.1 test/dummy/app/models/disco_app/shop.rb
disco_app-0.15.2 test/dummy/app/models/disco_app/shop.rb
disco_app-0.14.0 test/dummy/app/models/disco_app/shop.rb