We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d4c8827 + 7e1f2ef commit 8246923Copy full SHA for 8246923
lib/jbuilder.rb
@@ -350,16 +350,12 @@ def _scope
350
end
351
352
def _is_collection?(object)
353
- _object_respond_to?(object, :map, :count) && !(::Struct === object)
+ object.respond_to?(:map) && object.respond_to?(:count) && !(::Struct === object)
354
355
356
def _blank?(value=@attributes)
357
BLANK == value
358
359
-
360
- def _object_respond_to?(object, *methods)
361
- methods.all?{ |m| object.respond_to?(m) }
362
- end
363
364
365
require 'jbuilder/railtie' if defined?(Rails)
0 commit comments