Shopify / shopify-api-ruby

ShopifyAPI is a lightweight gem for accessing the Shopify admin REST and GraphQL web services.
MIT License
1.06k stars 473 forks source link

api_object.present? does not work #1283

Closed jasonbuehler closed 9 months ago

jasonbuehler commented 9 months ago

An unexpected error is raised when calling api_object.present?, NameError ('@empty?' is not allowed as an instance variable name)

Expected behavior

If the object is not nil it should return true, otherwise it should return false

Actual behavior

An non-relevant error was raised NameError ('@empty?' is not allowed as an instance variable name)

Steps to reproduce the problem

  1. Instantiate an api object api_product = shop.with_shopify_session { ShopifyAPI::Product.new }
  2. Invoke .present? on the object api_product.present?
sle-c commented 9 months ago

Related to https://github.com/Shopify/shopify-api-ruby/issues/1171

sle-c commented 9 months ago

Hi @jasonbuehler ,

Thank you for opening this issue, this is related to the one you opened here https://github.com/Shopify/shopify-api-ruby/issues/1273

I'll close this issue for now because it's a duplicate.

Si Le