我的代码:
a = AppParam.find_by key: 'lowest_price'
json.set! :response do
json.array!(@products) do |product|
json.extract! product, :id, :name, :description, :icon, :price, :tax, :is_active
json.url product_url(product, format: :json)
end
json.extract! a, :value
引发此错误:
no implicit conversion of String into Integer in json.extratct! a, :value