Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't use reciprocal on one_to_many

  • Loading branch information...
commit 01880d21605c2c74eb899314da5fe524573675e7 1 parent f41ab93
Saimon Moore authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sequel/plugins/polymorphic.rb
2  lib/sequel/plugins/polymorphic.rb
View
@@ -57,7 +57,7 @@ def one_to_many(*args, &block)
options ||= {}
many_class = many_of_class.to_s.singularize
if able = options[:as]
- associate(:one_to_many, many_of_class, :key=>"#{able}_id".to_sym) do |ds|
+ associate(:one_to_many, many_of_class, :key=>"#{able}_id".to_sym, :reciprocal => nil) do |ds|
ds.filter("#{able}_type".to_sym => self.class.to_s)
end
Please sign in to comment.
Something went wrong with that request. Please try again.