1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test/models/book.rb
Robert Pankowecki f8b53f35b9 test and fix collection_singular_ids= with string primary keys [#5125 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-08-02 16:41:20 +02:00

7 lines
253 B
Ruby

class Book < ActiveRecord::Base
has_many :citations, :foreign_key => 'book1_id'
has_many :references, :through => :citations, :source => :reference_of, :uniq => true
has_many :subscriptions
has_many :subscribers, :through => :subscriptions
end