Mercurial > hg > soundsoftware-site
annotate app/models/ssamr_user_detail.rb @ 378:c80fd1ef305f feature_121
Ensure Recent Activity shows only activity on projects the user is actually a member of, if invoked from My Page (rather than on all permitted projects)
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Mon, 04 Apr 2011 10:28:08 +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 |