Sha256: 53ec82f28ae86601c62f09557257ab937b5105ca4b517542dc883f7750775459
Contents?: true
Size: 438 Bytes
Versions: 5
Compression:
Stored size: 438 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
5 entries across 5 versions & 1 rubygems