Skip to content

Instantly share code, notes, and snippets.

@adamdilek
Created November 27, 2011 23:30
Show Gist options
  • Save adamdilek/1398439 to your computer and use it in GitHub Desktop.
Save adamdilek/1398439 to your computer and use it in GitHub Desktop.
coutry
class Services::AddressController < ApplicationController
respond_to :html, :xml, :json
def index
end
def provinces
@provinces=Province.all
respond_with(@provinces)
end
def counties
@province=Province.find(params[:province])
@[email protected]
respond_with([@counties])
end
def regions
@county=County.find(params[:county])
@[email protected]
respond_with(@regions)
end
def street_villages
@region=Region.find(params[:region])
@[email protected]_villages
respond_with(@street_villages)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment