public this repo is viewable by everyone
Clone URL: git://github.com/robbyrussell/rubyurl.git
Fixed that visits weren't associated with links even though it looks like 
it was designed for them to be associated.
rmm5t (author)
2 months ago
commit  61057f107e17827d1653fc9d858eb0f68d5fd405
tree    e9e95f97abb4b7a25244d520df6ddd6b08cf8133
parent  26886b6a75f2c37e6a056058e490e23b04054dcf
...
15
16
17
18
 
19
20
21
...
15
16
17
 
18
19
20
21
0
@@ -15,7 +15,7 @@ class Link < ActiveRecord::Base
0
   end
0
   
0
   def add_visit(request)
0
- visit = Visit.new
0
+ visit = visits.build
0
     visit.ip_address = request.remote_ip
0
     visit.save
0
     return visit
...
36
37
38
39
 
40
41
42
...
36
37
38
 
39
40
41
42
0
@@ -36,7 +36,7 @@ describe "Planet Argon link " do
0
     request.stub!(:remote_ip).and_return('127.0.0.1')
0
     lambda do
0
       @link.add_visit(request)
0
- end.should change(Visit, :count).by(1)
0
+ end.should change (@link.visits, :count).by(1)
0
   end
0
 end
0
 

Comments

    No one has commented yet.