search for: friendshipus

Displaying 1 result from an estimated 1 matches for "friendshipus".

Did you mean: friendships
2009 Feb 02
2
ActiveRecord::AssociationTypeMismatch (User(#54754560) expected, got User(#54510280))
...AssociationTypeMismatch error. i think this could be a bug related to ruby/rails when using mixins. heres a short version of my code: # user.rb require ''friend_invitation'' require ''friendship'' class User < ActiveRecord::Base include FriendInvitationUser, FriendshipUser ... end # friendship.rb ... module FriendshipUser def self.included(includer) includer.class_eval do has_many :friends, :through => :friendship end end # true, if other_user is a friend of mine def friend_of?(other_user) Friendship.between?(self, other_user)...