public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Fixed connection request email link
This resolves ticket #63.
Michael Hartl (author)
Tue May 13 12:02:52 -0700 2008
commit  3138fdb99082fe27c908bf77d52e78cc11118ab3
tree    6fd35c63a98aa76e3ef539241219395083102524
parent  243aa373a16998c066c8d41937f65e5575a2afd3
...
59
60
61
62
63
64
 
 
 
 
 
 
 
65
66
67
...
59
60
61
 
 
 
62
63
64
65
66
67
68
69
70
71
0
@@ -59,9 +59,13 @@
0
           create(:person => person, :contact => contact, :status => PENDING)
0
           create(:person => contact, :contact => person, :status => REQUESTED)
0
         end
0
- connection = conn(person, contact)
0
- PersonMailer.deliver_connection_request(connection) if send_mail
0
- connection
0
+ if send_mail
0
+ # The order here is important: the mail is sent *to* the contact,
0
+ # so the connection should be from the contact's point of view.
0
+ connection = conn(contact, person)
0
+ PersonMailer.deliver_connection_request(connection)
0
+ end
0
+ true
0
       end
0
     end
0
   
...
49
50
51
52
 
 
 
 
53
54
55
56
57
58
...
49
50
51
 
52
53
54
55
56
 
 
57
58
59
0
@@ -49,10 +49,11 @@
0
    describe "connection request" do
0
      
0
      before(:each) do
0
- @connection = Connection.request(people(:quentin), people(:aaron))
0
+ @person = people(:quentin)
0
+ @contact = people(:aaron)
0
+ Connection.request(@person, @contact)
0
+ @connection = Connection.conn(@contact, @person)
0
        @email = PersonMailer.create_connection_request(@connection)
0
- @person = @connection.person
0
- @contact = @connection.contact
0
      end
0
      
0
      it "should have the right recipient" do

Comments

    No one has commented yet.