Thanks for trying to help.

I have a HABTM relation between Roles, Users and Rights like this

class Right < ActiveRecord::Base
  has_and_belongs_to_many :roles
end

class Role < ActiveRecord::Base
  has_and_belongs_to_many :users
  has_and_belongs_to_many :rights
end

class User < ActiveRecord::Base

  has_and_belongs_to_many :roles

end

>> role = Role.find(:first)
#<Role id: 7, name: "root", created_at: "2008-04-25 02:21:49",
updated_at: "2008-04-25 02:21:49">

>> right = Right.find(:first)
#<Right id: 10, name: "Adventurelist", controller: "adventures",
action: "index", created_at: "2008-04-25 06:05:08", updated_at:
"2008-04-25 06:05:08">

>> role.rights << right
ActiveRecord::AssociationTypeMismatch: Right expected, got Right
>>

That's where I'm stuck.

Kind regards










On 25 Apr., 15:47, justindz <[EMAIL PROTECTED]> wrote:
> I can try to help.  You might use something like pastie or just post
> the related code here, though, as I don't recognize the error but
> might have some insight if I could see the block or file causing the
> problem.
>
> On Apr 25, 5:36 am, phaenotyp <[EMAIL PROTECTED]> wrote:
>
> > Hi guys,
> > heroku is awesome stuff. I'm really impressed with all the features
> > and possibility, ease of use.
>
> > While developing an Rails-application I'm encountering a problem
> > though. I do not know, if it is specific to heroku, 'cause I'm quite
> > new to Rails.
> > While trying to associate entries to oneanother I get this error:
>
> > ActiveRecord::AssociationTypeMismatch: Right expected, got Right
>
> > any suggestions?
>
> > kind regards
> > p
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Heroku" 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/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to