This project is archived and is in readonly mode.

#894 ✓invalid

has_and_belongs_to_many doesn't get the fixtures

Reported by xdmx | August 24th, 2008 @ 06:28 PM | in 2.x

(rails 2.1.0 and 2.0.2)

Two models: Users and Projects Connected with has_and_belongs_to_many_projects

*** users.yml

first: username: test

*** projects.yml

first: name: test project

*** projects_users.yml

first: user: first project: first

This doesn't work, it fail saying that there is any "user" and "project".

I've tried also

*** projects_users.yml

first: user: <%= users(:first) %> project: <%= projects(:first) %>

But still doesn't work

So i tried

*** projects_users.yml

first: user_id: <%= users(:first).id %> project_id: <%= projects(:first).id %>

And still nothing... just errors: undefined method 'users' for main:Object

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket