Sha256: 08d5bb8bf326bb2fe85d20d9a6cbb8b35b1b50c5c64c95e22185115b8f3c418e
Contents?: true
Size: 339 Bytes
Versions: 17
Compression:
Stored size: 339 Bytes
Contents
require 'active_utils' class DiscoApp::Shop < ActiveRecord::Base include DiscoApp::Concerns::Shop # 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
17 entries across 17 versions & 1 rubygems