Sha256: 85c6d2cbe47554606427a5b03ba4dd18999c84f6920221510098be73f7f0b4ab
Contents?: true
Size: 432 Bytes
Versions: 9
Compression:
Stored size: 432 Bytes
Contents
module Spree class State < ActiveRecord::Base belongs_to :country has_one :zone_member, :as => :zoneable has_one :zone, :through => :zone_member validates :country, :name, :presence => true def self.find_all_by_name_or_abbr(name_or_abbr) where("name = ? OR abbr = ?", name_or_abbr, name_or_abbr) end def <=>(other) name <=> other.name end def to_s name end end end
Version data entries
9 entries across 9 versions & 1 rubygems