validates_associated not honoring :if
Posted
by James Ferguson
on Stack Overflow
See other posts from Stack Overflow
or by James Ferguson
Published on 2010-06-03T05:54:10Z
Indexed on
2010/06/03
6:34 UTC
Read the original article
Hit count: 142
I'm totally blocked on this.
See this pastie for sample code: http://pastie.org/990040 The first test will fail.
The user model validates an associated address model, but is only supposed to do it if a flag is true. In practice it does it all the time.
What is going on?
© Stack Overflow or respective owner