You're trying to use ActiveRecord
query syntax on an ActiveResource
model (the shopify_api
gem uses ActiveResource
). ActiveResource
has it's own query syntax, although it's similar to the ActiveRecord
query syntax.
ActiveResource
doesn't have an order
method. The ActiveResource::Base documentation contains a list of available methods and also provides some working examples.
Sometimes the API you're consuming provides a method to sort the results. But the Shopify API doesn't provide those methods.
So you should sort the results locally, for example using sort_by
(see ruby-doc).