Displaying 1 result from an estimated 1 matches for "camptyp".
Did you mean:
camptype
2006 Feb 08
1
Weird validation issue
...me reason, it''s also affecting things
outside of validation.
For campers on certain camp types, we require some information about
their school. I tried to validate the information this way:
validates_presence_of :school_type, :if => Proc.new { |c|
!c.booking.nil? and ( c.booking.camp.camptype == Camptype.find(:first,
:conditions => [ ''name = ?'', "Children''s Camp"]) or
c.booking.camp.camptype == Camptype.find(:first, :conditions => [
''name = ?'', ''Adventure Camp'']) ) }
validates_presence_of :school_year, :if =...