view app/models/ssamr_user_detail.rb @ 637:efdb97a8286c cannam

Restore Tip of the Day settings entry lost during merge of rev cd2282d2aa55
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 06 Sep 2011 12:07:46 +0100
parents 9a5a265e77f0
children 8a26a0e291cf
line wrap: on
line source
class SsamrUserDetail < ActiveRecord::Base
  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