Yes, Site is the main model, equipment is associated. I only want to validate the equipment model when conditions exist in the site model.
On Wed, Jul 29, 2009 at 4:48 AM, Colin Law <[email protected]> wrote: > > 2009/7/29 Chris Habgood <[email protected]>: > > Well sort of. I really need to validate another model based on the > original > > form(model) conditions. > > Do you mean you are trying to validate a model that has already been > written to the database, when a form for a different model is > submitted? If not I think a little more detail in exactly what you > are trying to do may help. > > Colin > > > > > > On Tue, Jul 28, 2009 at 10:25 PM, Nicholas Henry < > [email protected]> > > wrote: > >> > >> This maybe of some help: > >> > >> http://railscasts.com/episodes/41-conditional-validations > >> > >> Cheers, > >> Nicholas > >> > >> On Jul 28, 10:15 pm, Me <[email protected]> wrote: > >> > If I have a site model that has_many :equipments, how would I validate > >> > the equipment only when ceratin conditions exist in the site model? > >> > > >> > I add the equipment dynamically in the Site form and also the form > >> > will not necessarily be "fully submitted" until some conditions exist > >> > in the main site form. > >> > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

