Sha256: e0c7a6513ba7565ec349434391dc90dca6931e2f3d71d41cb70bbcbfc98d15d3
Contents?: true
Size: 414 Bytes
Versions: 3
Compression:
Stored size: 414 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 ActiveUtils::Country.find(data[:country_name]) rescue ActiveUtils::InvalidCountryCodeError nil end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
disco_app-0.17.0 | test/dummy/app/models/disco_app/shop.rb |
disco_app-0.18.0 | test/dummy/app/models/disco_app/shop.rb |
disco_app-0.18.1 | test/dummy/app/models/disco_app/shop.rb |