lib/acts-as-joinable.rb in acts-as-joinable-0.0.6 vs lib/acts-as-joinable.rb in acts-as-joinable-0.1.0

- old
+ new

@@ -68,9 +68,12 @@ end def acts_as_relationship belongs_to :parent, :polymorphic => true belongs_to :child, :polymorphic => true + +# validates_uniqueness_of :parent_id, :scope => [:parent_type, :child_id] +# validates_uniqueness_of :child_id, :scope => [:child_type, :parent_id] # ActsAsJoinable.models.each do |m| # belongs_to "parent_#{m}".intern, :foreign_key => 'parent_id', :class_name => m.camelize # belongs_to "child_#{m}".intern, :foreign_key => 'child_id', :class_name => m.camelize # end \ No newline at end of file