Mercurial > hg > soundsoftware-site
annotate app/models/ssamr_user_detail.rb @ 863:818ff422eece bug_168
Close obsolete branch bug_168
author | Chris Cannam |
---|---|
date | Tue, 07 Jun 2011 10:56:57 +0100 |
parents | 9a5a265e77f0 |
children | 8a26a0e291cf |
rev | line source |
---|---|
luisf@56 | 1 class SsamrUserDetail < ActiveRecord::Base |
luisf@60 | 2 belongs_to :user |
luisf@64 | 3 |
luisf@64 | 4 validates_presence_of :description |
luisf@163 | 5 |
luisf@163 | 6 validate :check_institution |
luisf@163 | 7 |
luisf@163 | 8 def check_institution() |
luisf@163 | 9 errors.add(:institution_id, "Please insert an institution") if |
luisf@163 | 10 institution_id.blank? and other_institution.blank? |
luisf@163 | 11 end |
luisf@163 | 12 |
luisf@163 | 13 |
luisf@56 | 14 end |