Migrate country id-s to country codes

This commit is contained in:
Martin Lensment 2015-02-02 11:22:03 +02:00
parent ea6bdc19f9
commit 864c451a61
7 changed files with 41 additions and 11 deletions

View file

@ -6,7 +6,7 @@ class User < ActiveRecord::Base
# After activisation, system should require to change temp password.
# TODO: Estonian id validation
belongs_to :country
belongs_to :country_deprecated, foreign_key: "country_id"
validates :username, :password, presence: true
validates :identity_code, uniqueness: true, allow_blank: true