Sha256: e1c216353f8fb64be5ee8f7689e421b30e5aebf1606cc2717aa41759385369c6
Contents?: true
Size: 531 Bytes
Versions: 10
Compression:
Stored size: 531 Bytes
Contents
module ShopifyAPI class Metafield < Base include DisablePrefixCheck self.prefix = "/admin/:resource/:resource_id/" # Hack to allow both Shop and other Metafields in through the same AR class def self.prefix(options={}) options[:resource].nil? ? "/admin/" : "/admin/#{options[:resource]}/#{options[:resource_id]}/" end def value return if attributes["value"].nil? attributes["value_type"] == "integer" ? attributes["value"].to_i : attributes["value"] end end end
Version data entries
10 entries across 10 versions & 1 rubygems