view vendor/plugins/classic_pagination/test/fixtures/.svn/text-base/company.rb.svn-base @ 581:7c06dde557ec feature_36

Fixed Missing User Id when using auto complete to add authors
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 10 Aug 2011 16:23:55 +0100
parents 513646585e45
children
line wrap: on
line source
class Company < ActiveRecord::Base
  attr_protected :rating
  set_sequence_name :companies_nonstd_seq

  validates_presence_of :name
  def validate
    errors.add('rating', 'rating should not be 2') if rating == 2
  end  
end