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