Mercurial > hg > soundsoftware-site
annotate app/models/ssamr_user_detail.rb @ 866:2cd212a468b6 bug_152
Close obsolete branch bug_152
author | Chris Cannam |
---|---|
date | Wed, 11 May 2011 10:08:34 +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 |