[LRUG] Test does not load many to many fixture
Riccardo Tacconi
rtacconi at gmail.com
Wed Feb 10 09:19:48 PST 2010
Yes Tom,
I had the ids in my fixtures. I just wanted to understand why they
were not working. I agree that I should migrate away from them.
On Wed, Feb 10, 2010 at 5:10 PM, Tom Stuart <tom at experthuman.com> wrote:
> On 10 Feb 2010, at 17:07, Riccardo Tacconi wrote:
>> Actually it is not working for me:
>> role_id user_id
>> 135138679 3001
>>
>> That 135138679 id corresponds to any role_id in roles.
>
> For this to work you have to let Rails generate the primary key for your fixtures, i.e. don't provide any ids in your roles.yml.
>
> But, as others have said, your time would be better spent migrating away from fixtures entirely rather than investing any more in getting them to work.
>
> Cheers,
> -Tom
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
--
Riccardo Tacconi
Web developer at Wolseley UK
VIRTUELOGIC LIMITED (Director)
http://www.linkedin.com/in/riccardotacconi
http://riccardotacconi.blogspot.com/
http://twitter.com/rtacconi
Linux user: #400461
More information about the Chat
mailing list