I had two fields in my form i.e start and end time fields, i am
validating times but i am not reflecting the error message at the
field, what should i have to do to diplay the error as "start time
should be before end time".
please help me

validate :valid_times

 def valid_times
    if start_time >= end_time
      self.errors.add :start_time, 'has to be before end time'
    end
  end

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to