Mercurial > hg > soundsoftware-site
annotate app/models/ssamr_user_detail.rb @ 371:4188c6eaadf7 feature_128
Remove Tip of the Day from front page (fixing #128), move News to top of right column
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 01 Apr 2011 12:22:46 +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 |