I've actually had a problem that looks suspiciously similar in the
last couple of days. It turned out that a patch Dan made yesterday
fixed it -

http://github.com/datamapper/dm-core/commit/9115894c50af7f7119cff75df001510b79fce951

I suggest grabbing the latest from github and see if that fixes the
problem.



Chris wrote:
> Anyone encountered this before?
>
> >> @officer_role = Role.first(:label => :Officer)
> => #<Role @id=3 @label="Officer" @description=<not loaded>>
> >> agustina.roles << @officer_role
> => [#<Role @id=1 @label="Admin" @description=nil>, #<Role @id=3
> @label="Officer" @description=<not loaded>>]
> >> agustina.save
> => true
> >> agustina.reload
> => #<User @id=1 @login="xxx" @active=true @crypted_password="xxx"
> @salt="xxx">
> >> agustina.roles
> => [#<Role @id=1 @label="Admin" @description=nil>]
>
> It adds the object to the array, but as soon as I save, it disappears... It
> also refuses to see the instance as dirty, no matter how much I change the
> roles array.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to