public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Search Repo:
Missed svn adds for [8042]. References #6466.

git-svn-id: 
http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@8044 
5ecf4fe2-1ee6-0310-87b1-e25e094e27de
jeremy (author)
Sat Oct 27 12:25:23 -0700 2007
commit  cf3e9664a41b8137556b53efc1b1dbaeae68c079
tree    45c81f155d7e1ac4da4e53f7911b34ac69e6c9ee
parent  1117d73787c13f61b338cb54bf7992f9c6d2a05d
...
 
 
 
 
...
1
2
3
4
0
@@ -1 +1,5 @@
0
+class Book < ActiveRecord::Base
0
+ has_many :citations, :foreign_key => 'book1_id'
0
+ has_many :references, :through => :citations, :source => :reference_of, :uniq => true
0
+end
...
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
0
@@ -1 +1,8 @@
0
+awdr:
0
+ id: 1
0
+ name: "Agile Web Development with Rails"
0
+
0
+rfr:
0
+ id: 2
0
+ name: "Ruby for Rails"
...
 
 
 
 
 
 
...
1
2
3
4
5
6
0
@@ -1 +1,7 @@
0
+class Citation < ActiveRecord::Base
0
+ belongs_to :reference_of, :class_name => "Book", :foreign_key => :book2_id
0
+
0
+ belongs_to :book1, :class_name => "Book", :foreign_key => :book1_id
0
+ belongs_to :book2, :class_name => "Book", :foreign_key => :book2_id
0
+end

Comments

    No one has commented yet.