camdub/Internships

View on GitHub
app/models/country.rb

Summary

Maintainability
A
0 mins
Test Coverage
class Country < ActiveRecord::Base
  has_many :locations
  
  validates_presence_of :name
  validates_presence_of :un_code
  validates_length_of :un_code, :within => 3..3
  
end

# == Schema Information
#
# Table name: countries
#
#  id         :integer         not null, primary key
#  name       :string(255)
#  un_code    :string(255)
#  created_at :datetime
#  updated_at :datetime
#