Factory(:some_fact) is causing ActiveRecord::AssociationTypeMismatch while FactoryGirl.create(:some_fact) is not causing it
30 views
Skip to first unread message
Tsvetelina Borisova
unread,
Feb 15, 2013, 6:48:03 AM2/15/13
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 factor...@googlegroups.com
Can you help me and tell me why?
Josh Clayton
unread,
Feb 15, 2013, 8:58:10 AM2/15/13
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 factor...@googlegroups.com
Can you post the code calling the factory, your factories file, and the full backtrace?
Tsvetelina Borisova
unread,
Feb 15, 2013, 9:36:45 AM2/15/13
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 factor...@googlegroups.com
there are too many specs - more than 900 and I track the line where all errors happen:
Factory(:user) - apparently this creates and updates the user though in the update nothing is changed.
Josh Clayton
unread,
Feb 15, 2013, 9:40:34 AM2/15/13
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 factor...@googlegroups.com
This is likely because of an error with how you're assigning an association. I can't really provide more insight without seeing the code and the backtrace, though.