Sha256: 43a38d905afaf403ae9caf61cba7fbd22e2842637a6cedd08d79036ad11f231c

Contents?: true

Size: 215 Bytes

Versions: 29

Compression:

Stored size: 215 Bytes

Contents

module Spree
  module Api
    module V2
      module NumberResource
        def resource
          @resource ||= scope.find_by(number: params[:id]) || scope.find(params[:id])
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
spree_api-4.10.1 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.10.0 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.9.0 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.8.3 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.8.2 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.7.3 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.6 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.5.5 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.4.1 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.5.4 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.5 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.7.2 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.7.1 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.4 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.7.0 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.3 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.2 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.1 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.6.0 app/controllers/concerns/spree/api/v2/number_resource.rb
spree_api-4.5.3 app/controllers/concerns/spree/api/v2/number_resource.rb