Sha256: aec3b35346b28847bfd77cd4148fb67ea42dcc7db67e2633c86d89fecdf10c4c

Contents?: true

Size: 446 Bytes

Versions: 7

Compression:

Stored size: 446 Bytes

Contents

class Country < FrozenRecord::Base
  self.default_attributes = { contemporary: true, available: true }

  add_index :name, unique: true
  add_index :continent

  def self.republics
    where(king: nil)
  end

  def self.nato
    where(nato: true)
  end

  def reverse_name
    name.reverse
  end
end

module Compact
  class Country < ::Country
    include FrozenRecord::Compact
    def self.file_path
      superclass.file_path
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
frozen_record-0.20.0 spec/support/country.rb
frozen_record-0.19.5 spec/support/country.rb
frozen_record-0.19.4 spec/support/country.rb
frozen_record-0.19.3 spec/support/country.rb
frozen_record-0.19.2 spec/support/country.rb
frozen_record-0.19.1 spec/support/country.rb
frozen_record-0.19.0 spec/support/country.rb