app/models/concerns/blacklight/user.rb in blacklight-6.0.2 vs app/models/concerns/blacklight/user.rb in blacklight-6.1.0
- old
+ new
@@ -10,10 +10,10 @@
base.send :has_many, :searches, :dependent => :destroy, :as => :user
end
end
def bookmarks_for_documents documents = []
- if documents.length > 0
+ if documents.any?
bookmarks.where(document_type: documents.first.class.base_class.to_s, document_id: documents.map(&:id))
else
[]
end
end