I have the following scenario:
class User; has_and_belongs_to_many :roles; end
class Role; has_and_belongs_to_many :users; end
#roles schema only has name (string) as attribute
an additional table ‘roles_users’ with user_id (integer) and role_id
(integer) was necessary.
Then I created a fixture in users.yml:
roles: admin, guest
and in roles.yml:
This should work as mentioned in the docs:
But the following line did not pass:
Because users(:admin).roles is empty!
For the problem I crawled a lot of docs but I cannot see where I made
Could someone lead me in the right direction?