You are right it is clearly my own code and not in the latest stable version.
Thanks, Chris On Oct 5, 2009, at 8:43 AM, Bruno Bornsztein wrote: > Chris: are you on an old version of CE? There's no code in > FriendshipsController that looks like that. > > Jim: same question. User.rb validates_uniqueness of login_slug, so > two users shouldn't be able to end up with the same slug. > > On Sun, Oct 4, 2009 at 9:54 PM, jim <[email protected]> wrote: > > This also happens when two users have the following usernames: > user-name > user_name > What happens is that they would have the same login_slug and whoever > registers first is the one returned by the find method. > > Just override the generate_login_slug method to fix this bug. > > def generate_login_slug > self.login_slug = self.login.gsub(/[^a-z0-9_]+/i, '-') > end > > > On Oct 2, 3:40 am, Bruno Bornsztein <[email protected]> > wrote: > > Hi Chris,It may be a bug. To submit your changes (please make sure > to write > > passing tests that cover this scenario), just send me a pull > request on > > GitHub or send a patch. > > > > Here's some more info:http://help.github.com/forking/ > > > > Thanks! > > Bruno > > > > On Wed, Sep 30, 2009 at 7:38 PM, Christopher Becker > <[email protected]>wrote: > > > > > > > > > > > > > I have a user whose login ends with '5000'. The url builder > deals with > > > this by making it '...5-' in the urls, fine. But when I did > invite a friend > > > on this user, it actually created a friendship a completely > different > > > user...WHAT?! So I took a look at the controller/view and came > up with > > > these changes > > > for FrienshipsController.add_friend:was: @friendship = > > > Friendship.new(:user_id => @user.id, :friend_id => > > > User.find_by_login(params[:friend_id]).id, :initiator => true ) > > > *became: @friendship = Friendship.new(:user_id => > @user.id, :friend_id => > > > params[:friend_id], :initiator => true )* > > > * > > > * > > > Also changed my friendship link in the view: > > > *was: user_add_friend_url(current_user, user)* > > > *became: user_add_friend_url > (:user_id=>current_user.id, :friend_id=> > > > user.id)* > > > * > > > * > > > This is a bug right? I'm not sure what the process is for > working on the > > > current dev branch but if someone can point me to a "getting > started" or > > > wiki or whatever I can look into adding this myself. > > > > > Cheers, > > > Chris > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CommunityEngine" 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/communityengine?hl=en -~----------~----~----~----~------~----~------~--~---
