Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

sometimes singularize does not work, so we get a list of two strings.…

… just uniq them
  • Loading branch information...
commit b3bc3aa5cbe7540de21ae4eb566886e3b8efe6e3 1 parent 9e7040d
@tenderlove tenderlove authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activerecord/lib/active_record/reflection.rb
View
2  activerecord/lib/active_record/reflection.rb
@@ -635,7 +635,7 @@ def association_primary_key(klass = nil)
# # => [:tag, :tags]
#
def source_reflection_names
- @source_reflection_names ||= (options[:source] ? [options[:source]] : [name.to_s.singularize, name]).collect { |n| n.to_sym }
+ @source_reflection_names ||= (options[:source] ? [options[:source]] : [name.to_s.singularize, name]).collect { |n| n.to_sym }.uniq
end
def source_options
Please sign in to comment.
Something went wrong with that request. Please try again.