Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removes ! from flatten, was causing this procedure to return nil inst…

…ead of [] - which caused a nil deref downstream.
  • Loading branch information...
commit 16762cdd60c3ae410c44cb257d4cb39773426998 1 parent 9bc850e
@bwlang authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/bullet/registry/association.rb
View
2  lib/bullet/registry/association.rb
@@ -9,7 +9,7 @@ def merge( base, associations )
def similarly_associated( base, associations )
@registry.select do |key, value|
key.include?( base ) and value == associations
- end.collect( &:first ).flatten!
+ end.collect( &:first ).flatten
end
end
end

1 comment on commit 16762cd

@bwlang
Owner

fixes this problem
Status: 500 Internal Server Error
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.collect
/Library/Ruby/Gems/1.8/gems/bullet-2.0.1/lib/bullet/detector/unused_eager_association.rb:26:in call_object_association'
/Library/Ruby/Gems/1.8/gems/bullet-2.0.1/lib/bullet/detector/unused_eager_association.rb:34:in
diff_object_association'
/Library/Ruby/Gems/1.8/gems/bullet-2.0.1/lib/bullet/detector/unused_eager_association.rb:12:in `check_unused_preload_associations'

Please sign in to comment.
Something went wrong with that request. Please try again.