소스 검색

use new method if options is present

Ignacio Chiazzo 6 년 전
부모
커밋
dbdcfe1e38
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      lib/shopify_api/resources/smart_collection.rb

+ 1 - 1
lib/shopify_api/resources/smart_collection.rb

@@ -4,7 +4,7 @@ module ShopifyAPI
     include Metafields
 
     def products(options = {})
-      if options.key?(:only_sorted)
+      if options.present?
         Product.find(:all, from: "/admin/smart_collections/#{id}/products.json", params: options)
       else
         Product.find(:all, params: { collection_id: id })