Displaying 1 result from an estimated 1 matches for "d1ce2037".
2006 Mar 13
3
validation and update
Hi,
I have validation working in a situation similar to the following.
(Please forgive any minor typos below)
class Department < ActiveRecord::Base
has_many :people
end
class Person < ActiveRecord::Base
belongs_to :department
validates_presence_of :name
end
@department = Department.new(:name=>"bedrock")
@department.people << Person.new(:name=>"fred")