Created
July 30, 2012 11:35
-
-
Save mh-github/3206343 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def accept_connection = { | |
def user1 = session.user.attach() | |
user1.connections_requested_by.remove(params.profile_username) | |
user1.connections.add(profile_username) | |
user1.save() | |
User user2 = User.findByUsername(params.profile_username) | |
user2.connections.requested_to.remove(user1.username) | |
user2.save() | |
render (template: 'accept-connection') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment