Preksha Patel wrote: > Saurabh Peshkar wrote: >> Is the code working properly? > > hi if i don't fill any field then error messages are displayed for both > the model but also one message "club nil" as i wrote > validates_associated :club, :message => 'nil' in users model..and if i > fill data only for user model and don't fill for club model then > validation called for club with message "club nil" and user doesn't > save... and when i fill information for club model and not for user > model then only users model's validation are called without that "club > nil" message.. > > > so now only remaining thing is to remove that message display "club > nil"..as its work perfectly now..but thing is to now have to remove that > "club nil" message..
hey can u tell me if i write validates_associated :club in users model then when i don't fill information for club then message is displayed "club nil" or "club is invalid" so how can i remove this message?? if i write validates_associated :club, :message => 'nil' then club nil message is displayed on validation called.. and if i write validates_associated :club, :message => nil then club is invalid message is displayed on validations called.. so what should i write?? Please help me....... -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

