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
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.......