forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Missed svn adds for [8042]. References rails#6466.
git-svn-id: http://svn-commit.rubyonrails.org/rails/branches/1-2-stable@8044 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
- Loading branch information
Showing
3 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
class Book < ActiveRecord::Base | ||
has_many :citations, :foreign_key => 'book1_id' | ||
has_many :references, :through => :citations, :source => :reference_of, :uniq => true | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
awdr: | ||
id: 1 | ||
name: "Agile Web Development with Rails" | ||
|
||
rfr: | ||
id: 2 | ||
name: "Ruby for Rails" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Citation < ActiveRecord::Base | ||
belongs_to :reference_of, :class_name => "Book", :foreign_key => :book2_id | ||
|
||
belongs_to :book1, :class_name => "Book", :foreign_key => :book1_id | ||
belongs_to :book2, :class_name => "Book", :foreign_key => :book2_id | ||
end |