To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / models / ssamr_user_detail.rb @ 440:6253d777aa12

History | View | Annotate | Download (294 Bytes)

1
class SsamrUserDetail < ActiveRecord::Base
2
  belongs_to :user
3

    
4
  validates_presence_of :description
5

    
6
  validate :check_institution
7

    
8
  def check_institution()
9
    errors.add(:institution_id, "Please insert an institution") if
10
      institution_id.blank? and other_institution.blank?
11
  end
12

    
13

    
14
end