Mercurial > hg > soundsoftware-site
diff app/models/ssamr_user_detail.rb @ 195:172b8d25c1ae live
Merge from branch "feature_64"
author | Chris Cannam |
---|---|
date | Mon, 07 Feb 2011 13:47:47 +0000 |
parents | 9a5a265e77f0 |
children | 8a26a0e291cf |
line wrap: on
line diff
--- a/app/models/ssamr_user_detail.rb Wed Feb 02 11:44:48 2011 +0000 +++ b/app/models/ssamr_user_detail.rb Mon Feb 07 13:47:47 2011 +0000 @@ -2,4 +2,13 @@ belongs_to :user validates_presence_of :description + + validate :check_institution + + def check_institution() + errors.add(:institution_id, "Please insert an institution") if + institution_id.blank? and other_institution.blank? + end + + end