Sha256: c2c0327d972b618b35a99f0709743d163394f94bbcb99cce06632c6f57eeb6ee
Contents?: true
Size: 439 Bytes
Versions: 11
Compression:
Stored size: 439 Bytes
Contents
require 'active_utils' class DiscoApp::Shop < ActiveRecord::Base 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
11 entries across 11 versions & 1 rubygems