Sha256: 961a34f80240ae628ecab0e4427776dcf50c3e67d33414102a7afebb955e73bb

Contents?: true

Size: 348 Bytes

Versions: 7

Compression:

Stored size: 348 Bytes

Contents

require 'earth/model'

require 'earth/pet/breed_gender'

class Gender < ActiveRecord::Base
  extend Earth::Model

  TABLE_STRUCTURE = <<-EOS

CREATE TABLE genders
  (
     name CHARACTER VARYING(255) NOT NULL PRIMARY KEY
  );

EOS

  self.primary_key = "name"
  
  has_many :breed_genders, :foreign_key => 'gender_name'
  
  warn_unless_size 2
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-1.2.1 lib/earth/pet/gender.rb
earth-1.1.2 lib/earth/pet/gender.rb
earth-1.1.1 lib/earth/pet/gender.rb
earth-1.1.0 lib/earth/pet/gender.rb
earth-1.0.3 lib/earth/pet/gender.rb
earth-1.0.2 lib/earth/pet/gender.rb
earth-1.0.1 lib/earth/pet/gender.rb