On 29 February 2012 14:53, LED <[email protected]> wrote: > hi im new in rails and starting to develop my application which is a > online reservation im just wondering if there is a way in Ruby on > rails to group a validation > > ei. i want to validate the uniqueness of date first in the database > and check what are the timeStart and endTime entries in that > particular date and validate its uniqueness(timeStart and endTime) > base on the date? is it possible in validation or do i have to make a > controller or method for it?
You might be better to use datetime column types rather than a separate date and time. Then you will just need to check the uniqueness of the datetime values. You can easily then extract the date and time separately for display purposes. Colin -- 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.

