diff --git a/lib/jbuilder.rb b/lib/jbuilder.rb index b12624b..b2c75c5 100644 --- a/lib/jbuilder.rb +++ b/lib/jbuilder.rb @@ -350,16 +350,12 @@ def _scope end def _is_collection?(object) - _object_respond_to?(object, :map, :count) && !(::Struct === object) + object.respond_to?(:map) && object.respond_to?(:count) && !(::Struct === object) end def _blank?(value=@attributes) BLANK == value end - - def _object_respond_to?(object, *methods) - methods.all?{ |m| object.respond_to?(m) } - end end require 'jbuilder/railtie' if defined?(Rails)