Sha256: d17097a7c617c1b37948ced1413e72aff9e644543dac8b52f263c83117229d26

Contents?: true

Size: 217 Bytes

Versions: 1

Compression:

Stored size: 217 Bytes

Contents

module Gemgento

  # @author Gemgento LLC
  class Region < ActiveRecord::Base
    belongs_to :country

    default_scope -> { order(:name, :code) }

    def name
      super.nil? ? self.code : super
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gemgento-2.8.0 app/models/gemgento/region.rb