Sha256: f064da5bd5d8f716a76082e9dacc82ae00f510482efbf33e2dbbc4ffed08b961

Contents?: true

Size: 264 Bytes

Versions: 3

Compression:

Stored size: 264 Bytes

Contents

require_dependency "jp_address/application_controller"

module JpAddress
  class ZipcodesController < ApplicationController
    def search
      @zipcode = Zipcode.find_by(:zip => params[:zip]) || Zipcode.new
      render plain: @zipcode.to_json
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
jp_address-0.0.6 app/controllers/jp_address/zipcodes_controller.rb
jp_address-0.0.5 app/controllers/jp_address/zipcodes_controller.rb
jp_address-0.0.4 app/controllers/jp_address/zipcodes_controller.rb