| Class | FriendsController |
| In: |
app/controllers/my_profile/friends_controller.rb
|
| Parent: | MyProfileController |
# File app/controllers/my_profile/friends_controller.rb, line 9
9: def add
10: @friend = Person.find(params[:id])
11: if request.post? && params[:confirmation]
12: # FIXME this shouldn't be in Person model?
13: AddFriend.create!(:person => profile, :friend => @friend, :group_for_person => params[:group])
14:
15: flash[:notice] = _('%s still needs to accept being your friend.') % @friend.name
16: # FIXME shouldn't redirect to the friend's page?
17: redirect_to :action => 'index'
18: end
19: end