mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
18 lines
273 B
Ruby
18 lines
273 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Spree
|
|
class Country < ActiveRecord::Base
|
|
has_many :states, -> { order('name ASC') }
|
|
|
|
validates :name, :iso_name, presence: true
|
|
|
|
def <=>(other)
|
|
name <=> other.name
|
|
end
|
|
|
|
def to_s
|
|
name
|
|
end
|
|
end
|
|
end
|