public
Description: Rails plugin for cleanly modeling social networks using ActiveRecord
Homepage: http://www.zetetic.net/2007/09/21/social-networking-with-rails-using-actsasnetwork
Clone URL: git://github.com/sjlombardo/acts_as_network.git
Fix problem where acts_as_network fails for multi-word models
sjlombardo (author)
Sat Jul 19 07:58:47 -0700 2008
commit  c7fcb8aacb8b41e37cbd5b7e54fe8816c67af2fa
tree    f5963d9b7d05156f1e2d777431a8ccfdc88952b8
parent  358fc0c3a8b596bb83bb479d361039184b9ecec0
...
246
247
248
249
 
250
251
252
253
254
255
256
 
257
258
259
...
246
247
248
 
249
250
251
252
253
254
255
 
256
257
258
259
0
@@ -246,14 +246,14 @@ module Zetetic #:nodoc:
0
             has_many "#{through_sym}_out".to_sym, :class_name => through_class, 
0
               :foreign_key => configuration[:foreign_key]
0
             has_many "#{relationship}_out".to_sym, :through => "#{through_sym}_out".to_sym, 
0
-              :source => "#{name.downcase}_target",  :foreign_key => configuration[:foreign_key],
0
+              :source => "#{name.tableize.singularize}_target",  :foreign_key => configuration[:foreign_key],
0
               :conditions => configuration[:conditions]
0
       
0
             # a node has many inbound relationships
0
             has_many "#{through_sym}_in".to_sym, :class_name => through_class, 
0
               :foreign_key => configuration[:association_foreign_key]
0
             has_many "#{relationship}_in".to_sym, :through => "#{through_sym}_in".to_sym, 
0
-              :source => name.downcase, :foreign_key => configuration[:association_foreign_key],
0
+              :source => name.tableize.singularize, :foreign_key => configuration[:association_foreign_key],
0
               :conditions => configuration[:conditions]
0
             
0
             # when using a join model, define a method providing a unioned view of all the join

Comments