When I remove the 2nd one, my tests run noticeably faster. Is the
above causing validations to be run twice ?
sreid
unread,
Aug 25, 2011, 1:11:33 PM8/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
And if it is a duplication, are there any differences, and which
method is best ?
sreid
unread,
Aug 25, 2011, 1:33:07 PM8/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ruby on Rails: Talk
Also, is there some reason why validates_associated does not throw an
exception on nil ?
Tim Shaffer
unread,
Aug 25, 2011, 1:53:29 PM8/25/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rubyonra...@googlegroups.com
That's just the way it's designed to work. If you want to make sure it's not null, you'll need to also use validates_presence_of or validates :presence => true