Sha256: b2951fdab0c4a9bfc0f51247efe9755d59f962d8bb2d849c4719762ff53a1a6f
Contents?: true
Size: 400 Bytes
Versions: 10
Compression:
Stored size: 400 Bytes
Contents
require_dependency "addresses/application_controller" module Addresses class ZipcodesController < ApplicationController def show @zipcode = Zipcode.find_or_create_by_service(params[:zipcode]) if @zipcode.nil? render json: { errors: ['Zipcode not found'] }, success: false, status: :unprocessable_entity else render json: @zipcode end end end end
Version data entries
10 entries across 10 versions & 1 rubygems