Sha256: 99d0ab72f1280fff492526cb02fdc65723a527199ba6924ce4c7f1517bbd0341
Contents?: true
Size: 664 Bytes
Versions: 28
Compression:
Stored size: 664 Bytes
Contents
require 'kb/fake/bounded_context/rest_resource' module BoundedContext module PetFamily module Products extend ActiveSupport::Concern include RestResource included do include RestResource resource :products, except: %i[create update destroy] def products_filterable_attributes [:country] end def on_products_index(_version) return json_response 400, {} if params['country'].nil? return json_response 422, {} if ISO3166::Country.search(params['country']).nil? json_response 200, filter_resources(:products, params) end end end end end
Version data entries
28 entries across 28 versions & 2 rubygems